Class BaseClassNameConflictResolver

java.lang.Object
org.exolab.castor.builder.conflict.strategy.BaseClassNameConflictResolver
All Implemented Interfaces:
ClassNameConflictResolver
Direct Known Subclasses:
TypeClassNameConflictResolver, XPATHClassNameConflictResolver

public abstract class BaseClassNameConflictResolver extends Object implements ClassNameConflictResolver
Base class for class name conflict resolver implementations.
Author:
Werner Guttmann
  • Constructor Details

    • BaseClassNameConflictResolver

      public BaseClassNameConflictResolver()
  • Method Details

    • changeClassInfoAsResultOfConflict

      public abstract void changeClassInfoAsResultOfConflict(JClass jClass, String xpath, String typedXPath, Annotated annotated)
      Changes the JClass' internal class name, as a result of an XPATH expression uniquely identifying an XML artefact within an XML schema.
      Specified by:
      changeClassInfoAsResultOfConflict in interface ClassNameConflictResolver
      Parameters:
      jClass - The JClass instance whose local name should be changed.
      xpath - XPATH expression used to defer the new local class name
      typedXPath - typed XPATH expression used to defer the new local class name
      annotated - Annotated instance
    • calculateXPathPrefix

      protected String calculateXPathPrefix(String xpath)
      Calculate XPath prefix.
      Parameters:
      xpath - The XPath to be transformed into a class name prefix
      Returns:
      The class name prefix to use.
    • setSourceGenerator

      public void setSourceGenerator(SourceGenerator sourceGenerator)
      Sets the calling SourceGenerator instance.
      Specified by:
      setSourceGenerator in interface ClassNameConflictResolver
      Parameters:
      sourceGenerator - The calling SourceGenerator instance.
    • getSourceGenerator

      protected SourceGenerator getSourceGenerator()
      Returns the calling SourceGenerator instance.
      Returns:
      the calling SourceGenerator instance