|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.builder.factory.BaseFactory
org.exolab.castor.builder.factory.SourceFactory
public final class SourceFactory
Creates the Java Source classes for Schema components.
Constructor Summary | |
---|---|
SourceFactory(BuilderConfiguration config,
FieldInfoFactory infoFactory,
GroupNaming groupNaming,
SourceGenerator sourceGenerator)
Creates a new SourceFactory with the given FieldInfoFactory. |
Method Summary | |
---|---|
void |
createEqualsMethod(JClass jclass)
Create an 'equals' method on the given JClass. |
static void |
createHashCodeMethod(JClass jclass)
Create an "hashCode" method on the given JClass. |
JClass |
createSourceCode(ExtendedBinding binding,
SimpleType simpleType,
SGStateInfo sgState)
Creates the Java source code to support the given Simpletype. |
JClass[] |
createSourceCode(XMLBindingComponent component,
SGStateInfo sgState)
Creates a new ClassInfo for the given XMLBindingComponent. |
void |
createTestableMethods(JClass jclass,
FactoryState state)
Implement org.castor.xmlctf.CastorTestable im the given JClass. |
void |
setCaseInsensitive(boolean caseInsensitive)
Set to true if enumerated type lookups should be performed in a case insensitive manner. |
void |
setCreateExtraMethods(boolean extraMethods)
Sets whether or not to create extra collection methods for accessing the actual collection. |
void |
setCreateMarshalMethods(boolean createMarshalMethods)
Sets whether or not to create the XML marshaling framework specific methods (marshal, unmarshal, validate) in the generated classes. |
void |
setReferenceMethodSuffix(java.lang.String suffix)
Sets the method suffix (ending) to use when creating the extra collection methods. |
void |
setSAX1(boolean sax1)
Sets to true if SAX1 should be used in the marshall method. |
void |
setTestable(boolean testable)
Sets whether or not to implement CastorTestable. |
Methods inherited from class org.exolab.castor.builder.factory.BaseFactory |
---|
createComment, extractCommentsFromAnnotations, getConfig, getGroupNaming, getInfoFactory, getJavaNaming, getSourceGenerator, normalize, setGroupNaming |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceFactory(BuilderConfiguration config, FieldInfoFactory infoFactory, GroupNaming groupNaming, SourceGenerator sourceGenerator)
config
- the BuilderConfiguration instance (must not be null).infoFactory
- the FieldInfoFactory to usegroupNaming
- Group naming scheme to be used.sourceGenerator
- the calling source generator.Method Detail |
---|
public void setCreateMarshalMethods(boolean createMarshalMethods)
createMarshalMethods
- a boolean, when true indicates to generated the marshaling
framework methodspublic void setCreateExtraMethods(boolean extraMethods)
extraMethods
- a boolean that when true indicates that extra collection
accessor methods should be created. False by default.org.exolab.castor.builder.SourceFactory#setReferenceMethodSuffix
public void setReferenceMethodSuffix(java.lang.String suffix)
suffix
- the method suffix to use when creating the extra collection
methods. If null or emtpty the default value, as specified in
CollectionInfo will be used.org.exolab.castor.builder.SourceFactory#setCreateExtraMethods
public void setTestable(boolean testable)
testable
- if true, indicates to implement CastorTestablepublic void setSAX1(boolean sax1)
sax1
- true if SAX1 should be used.public void setCaseInsensitive(boolean caseInsensitive)
caseInsensitive
- when truepublic JClass[] createSourceCode(XMLBindingComponent component, SGStateInfo sgState)
component
- the XMLBindingComponent that abstracts all XML Schema
definition for a XML Schema component.sgState
- The given state of the SourceGenerator.
public JClass createSourceCode(ExtendedBinding binding, SimpleType simpleType, SGStateInfo sgState)
binding
- Current XML bindingsimpleType
- the Simpletype to create the Java source forsgState
- the current SGStateInfo (cannot be null).
public static void createHashCodeMethod(JClass jclass)
jclass
- the JClass in wich we create the hashCode method.public void createEqualsMethod(JClass jclass)
jclass
- the Jclass in which we create the equals methodpublic void createTestableMethods(JClass jclass, FactoryState state)
jclass
- The JClass which will implement the CastorTestable Interface.state
- our state, e.g., state of this Factory instance.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |