|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.builder.SourceFactory
public class SourceFactory
This class creates the Java Source classes for Schema components
Constructor Summary | |
---|---|
SourceFactory(BuilderConfiguration config)
Creates a new SourceFactory using the default FieldInfo factory. |
|
SourceFactory(BuilderConfiguration config,
FieldInfoFactory infoFactory)
Creates a new SourceFactory with the given FieldInfoFactory |
Method Summary | |
---|---|
static void |
createEqualsMethod(JClass jclass)
Create an 'equals' 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. |
static void |
createTestableMethods(JClass jclass,
FactoryState state)
Implement org.exolab.castor.tests.framework.CastorTestable im the given JClass |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceFactory(BuilderConfiguration config)
config
- the BuilderConfiguration instance (must not be null).public SourceFactory(BuilderConfiguration config, FieldInfoFactory infoFactory)
config
- the BuilderConfiguration instance (must not be null).infoFactory
- the FieldInfoFactory to useMethod Detail |
---|
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
- a boolean, when true indicates
to implement CastorTestablepublic void setSAX1(boolean sax1)
sax1
- true if SAX1 should be used.public 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 createEqualsMethod(JClass jclass)
jclass
- the Jclass in which we create the equals methodpublic static void createTestableMethods(JClass jclass, FactoryState state)
jclass
- the JCLass which will implement the CastorTestable Interfaceorg.exolab.castor.tests.framework.CastorTestable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |