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 java.lang.Object implements ClassNameConflictResolver
Base class for class name conflict resolver implementations.- Author:
- Werner Guttmann
-
-
Constructor Summary
Constructors Constructor Description BaseClassNameConflictResolver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
calculateXPathPrefix(java.lang.String xpath)
Calculate XPath prefix.abstract void
changeClassInfoAsResultOfConflict(JClass jClass, java.lang.String xpath, java.lang.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.protected SourceGenerator
getSourceGenerator()
Returns the callingSourceGenerator
instance.void
setSourceGenerator(SourceGenerator sourceGenerator)
Sets the callingSourceGenerator
instance.
-
-
-
Method Detail
-
changeClassInfoAsResultOfConflict
public abstract void changeClassInfoAsResultOfConflict(JClass jClass, java.lang.String xpath, java.lang.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 interfaceClassNameConflictResolver
- Parameters:
jClass
- TheJClass
instance whose local name should be changed.xpath
- XPATH expression used to defer the new local class nametypedXPath
- typed XPATH expression used to defer the new local class nameannotated
-Annotated
instance
-
calculateXPathPrefix
protected java.lang.String calculateXPathPrefix(java.lang.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 callingSourceGenerator
instance.- Specified by:
setSourceGenerator
in interfaceClassNameConflictResolver
- Parameters:
sourceGenerator
- The callingSourceGenerator
instance.
-
getSourceGenerator
protected SourceGenerator getSourceGenerator()
Returns the callingSourceGenerator
instance.- Returns:
- the calling
SourceGenerator
instance
-
-