org.exolab.castor.builder
Class SourceFactory
java.lang.Object
org.exolab.castor.builder.SourceFactory
public class SourceFactory
extends java.lang.Object
This class creates the Java Source classes for Schema
components
$Revision: 1.5 $ $Date: 2003/06/03 18:50:36 $
SourceFactory
public SourceFactory()
Creates a new SourceFactory using the default FieldInfo factory.
SourceFactory
public SourceFactory(FieldInfoFactory infoFactory)
Creates a new SourceFactory with the given FieldInfoFactory
infoFactory
- the FieldInfoFactory to use
createEqualsMethod
public static void createEqualsMethod(JClass jclass)
Create an 'equals' method on the given
JClass
jclass
- the Jclass in which we create the equals method
createSourceCode
public JClass[] createSourceCode(XMLBindingComponent component,
SGStateInfo sgState)
Creates a new ClassInfo for the given XMLBindingComponent.
component
- the XMLBindingComponent that abstracts all XML
Schema definition for a XML Schema component.sgState
- The given state of the SourceGenerator.
- an array of JClasses reflecting the given XMLBindingComponent.
createSourceCode
public JClass createSourceCode(SimpleType simpleType,
SGStateInfo sgState)
Creates the Java source code to support the given Simpletype
simpleType
- the Simpletype to create the Java source forsgState
- the current SGStateInfo (cannot be null).
- the JClass representation of the given Simpletype
createTestableMethods
public static void createTestableMethods(JClass jclass)
Implement org.exolab.castor.tests.framework.CastorTestable im the
given JClass
jclass
- the JCLass which will implement the CastorTestable Interface
org.exolab.castor.tests.framework.CastorTestable
setCreateMarshalMethods
public void setCreateMarshalMethods(boolean createMarshalMethods)
Sets whether or not to create the XML marshalling framework specific
methods (marshall, unmarshall, validate) in the generated classes.
By default, these methods are generated.
createMarshalMethods
- a boolean, when true indicates
to generated the marshalling framework methods
setSAX1
public void setSAX1(boolean sax1)
Sets to true if SAX1 should be used in the marshall method.
sax1
- true if SAX1 should be used.
setTestable
public void setTestable(boolean testable)
Sets whether or not to create the XML marshalling framework specific
methods (marshall, unmarshall, validate) in the generated classes.
By default, these methods are generated.
testable
- a boolean, when true indicates
to generate testing framework methods
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com