public class SourceFactory extends BaseFactory
_config, _groupNaming, _infoFactory| Constructor and Description |
|---|
SourceFactory(BuilderConfiguration config,
FieldInfoFactory infoFactory,
GroupNaming groupNaming)
Creates a new SourceFactory with the given FieldInfoFactory.
|
| Modifier and Type | Method and Description |
|---|---|
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(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.exolab.castor.tests.framework.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 marshalling framework specific
methods (marshall, unmarshall, 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.
|
normalizepublic SourceFactory(BuilderConfiguration config, FieldInfoFactory infoFactory, GroupNaming groupNaming)
config - the BuilderConfiguration instance (must not be null).infoFactory - the FieldInfoFactory to usegroupNaming - Group naming scheme to be used.public void setCreateMarshalMethods(boolean createMarshalMethods)
createMarshalMethods - a boolean, when true indicates to generated the marshalling
framework methodspublic void setCreateExtraMethods(boolean extraMethods)
extraMethods - a boolean that when true indicates that extra collection
accessor methods should be created. False by default.setReferenceMethodSuffix(java.lang.String)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.setCreateExtraMethods(boolean)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(SimpleType simpleType, SGStateInfo sgState)
simpleType - 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.Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com