public final class SourceFactory extends BaseFactory
| Constructor | Description | 
|---|---|
SourceFactory(BuilderConfiguration config,
             FieldInfoFactory infoFactory,
             GroupNaming groupNaming,
             SourceGenerator sourceGenerator) | 
 Creates a new SourceFactory with the given FieldInfoFactory. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
void | 
createEqualsMethod(JClass jclass) | 
 Create an 'equals' method on the given JClass. 
 | 
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. 
 | 
createComment, extractCommentsFromAnnotations, getConfig, getGroupNaming, getInfoFactory, getJavaNaming, getSourceGenerator, normalize, setGroupNamingpublic 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.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#setReferenceMethodSuffixpublic 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#setCreateExtraMethodspublic 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 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.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com