Public Member Functions | Static Public Member Functions

org.exolab.castor.builder.SourceFactory Class Reference

List of all members.

Public Member Functions

 SourceFactory (BuilderConfiguration config)
 SourceFactory (BuilderConfiguration config, FieldInfoFactory infoFactory)
void setCreateMarshalMethods (boolean createMarshalMethods)
void setCreateExtraMethods (boolean extraMethods)
void setReferenceMethodSuffix (String suffix)
void setTestable (boolean testable)
void setSAX1 (boolean sax1)
JClass[] createSourceCode (XMLBindingComponent component, SGStateInfo sgState)
JClass createSourceCode (SimpleType simpleType, SGStateInfo sgState)

Static Public Member Functions

static void createEqualsMethod (JClass jclass)
static void createTestableMethods (JClass jclass)

Detailed Description

This class creates the Java Source classes for Schema components

Author:
Keith Visco
Arnaud Blandin
Version:
Revision:
1.16
Date:
2004/10/06 08:48:53

Constructor & Destructor Documentation

org.exolab.castor.builder.SourceFactory.SourceFactory ( BuilderConfiguration  config  ) 

Creates a new SourceFactory using the default FieldInfo factory.

Parameters:
config the BuilderConfiguration instance (must not be null).
org.exolab.castor.builder.SourceFactory.SourceFactory ( BuilderConfiguration  config,
FieldInfoFactory  infoFactory 
)

Creates a new SourceFactory with the given FieldInfoFactory

Parameters:
config the BuilderConfiguration instance (must not be null).
infoFactory the FieldInfoFactory to use

Member Function Documentation

static void org.exolab.castor.builder.SourceFactory.createEqualsMethod ( JClass  jclass  )  [static]
JClass [] org.exolab.castor.builder.SourceFactory.createSourceCode ( XMLBindingComponent  component,
SGStateInfo  sgState 
)

Creates a new ClassInfo for the given XMLBindingComponent.

Parameters:
component the XMLBindingComponent that abstracts all XML Schema definition for a XML Schema component.
sgState The given state of the SourceGenerator.
Returns:
an array of JClasses reflecting the given XMLBindingComponent.

References org.exolab.castor.builder.ClassInfo.addFieldInfo(), org.exolab.javasource.JStructure.addImport(), org.exolab.javasource.JStructure.addInterface(), org.exolab.castor.builder.util.ClassInfoResolverImpl.bindReference(), org.exolab.castor.builder.SGStateInfo.bindSourceCode(), org.exolab.castor.xml.schema.Order.choice, org.exolab.castor.builder.FactoryState.classInfo, org.exolab.castor.builder.TypeConversion.convertType(), org.exolab.castor.builder.FieldInfo.createAccessMethods(), org.exolab.castor.builder.FieldInfoFactory.createCollection(), org.exolab.castor.builder.SourceFactory.createEqualsMethod(), org.exolab.castor.builder.FieldInfoFactory.createFieldInfo(), org.exolab.castor.builder.MemberFactory.createFieldInfoForContent(), org.exolab.castor.builder.binding.XMLBindingComponent.createGroupItem(), org.exolab.castor.builder.FieldInfo.createJavaField(), org.exolab.castor.builder.FieldInfo.generateInitializerCode(), org.exolab.castor.builder.binding.XMLBindingComponent.getAnnotated(), org.exolab.castor.builder.binding.XMLBindingComponent.getBinding(), org.exolab.javasource.JClass.getConstructor(), org.exolab.castor.xml.schema.ComplexType.getContentType(), org.exolab.castor.builder.SGStateInfo.getCurrentFactoryState(), org.exolab.castor.builder.SGStateInfo.getDialog(), org.exolab.castor.builder.binding.XMLBindingComponent.getExtends(), org.exolab.castor.builder.ClassInfo.getGroupInfo(), org.exolab.castor.builder.binding.XMLBindingComponent.getImplements(), org.exolab.castor.builder.binding.XMLBindingComponent.getJavaClassName(), org.exolab.castor.builder.binding.XMLBindingComponent.getJavaPackage(), org.exolab.castor.builder.ClassInfo.getJClass(), org.exolab.javasource.JStructure.getJDocComment(), org.exolab.castor.xml.schema.Particle.getMaxOccurs(), org.exolab.javasource.JStructure.getModifiers(), org.exolab.castor.xml.schema.Group.getOrder(), org.exolab.castor.xml.schema.ComplexType.getParticle(), org.exolab.castor.xml.schema.ComplexType.getParticleCount(), org.exolab.castor.builder.binding.XMLBindingComponent.getQualifiedName(), org.exolab.castor.xml.schema.XMLType.getSchema(), org.exolab.castor.xml.schema.SimpleContent.getSimpleType(), org.exolab.javasource.JConstructor.getSourceCode(), org.exolab.castor.builder.SGStateInfo.getSourceCode(), org.exolab.castor.xml.schema.Structure.getStructureType(), org.exolab.javasource.JClass.getSuperClass(), org.exolab.castor.xml.schema.Schema.getTargetNamespace(), org.exolab.castor.builder.binding.XMLBindingComponent.getTargetNamespace(), org.exolab.castor.xml.schema.ContentType.getType(), org.exolab.castor.builder.binding.XMLBindingComponent.getXMLName(), org.exolab.castor.builder.binding.XMLBindingComponent.getXMLType(), org.exolab.castor.builder.binding.XMLBindingComponent.hasBoundProperties(), org.exolab.castor.builder.binding.XMLBindingComponent.hasEquals(), org.exolab.castor.xml.schema.SimpleType.hasFacet(), org.exolab.castor.builder.binding.XMLBindingComponent.isAbstract(), org.exolab.castor.xml.schema.XMLType.isAnyType(), org.exolab.castor.xml.schema.XMLType.isComplexType(), org.exolab.castor.builder.binding.XMLBindingComponent.isFinal(), org.exolab.castor.xml.schema.XMLType.isSimpleType(), org.exolab.castor.xml.schema.ComplexType.isTopLevel(), org.exolab.castor.builder.FactoryState.jClass, org.exolab.castor.builder.FactoryState.markAsProcessed(), org.exolab.castor.xml.schema.ContentType.mixed, org.exolab.castor.builder.util.Dialog.notify(), org.exolab.castor.builder.SGStateInfo.packageName, org.exolab.castor.builder.FactoryState.processed(), org.exolab.castor.builder.util.ClassInfoResolverImpl.resolve(), org.exolab.castor.xml.schema.Order.seq, org.exolab.castor.builder.ClassInfo.setAbstract(), org.exolab.javasource.JModifiers.setAbstract(), org.exolab.castor.builder.GroupInfo.setAsAll(), org.exolab.castor.builder.GroupInfo.setAsChoice(), org.exolab.castor.builder.GroupInfo.setAsSequence(), org.exolab.castor.builder.binding.XMLBindingComponent.setBinding(), org.exolab.javasource.JDocComment.setComment(), org.exolab.castor.builder.ClassInfo.setContainer(), org.exolab.castor.builder.FieldInfo.setContainer(), org.exolab.castor.builder.FactoryState.setCreateGroupItem(), org.exolab.castor.builder.SGStateInfo.setCurrentFactoryState(), org.exolab.javasource.JModifiers.setFinal(), org.exolab.castor.builder.XMLInfo.setNamespaceURI(), org.exolab.castor.builder.XMLInfo.setNodeName(), org.exolab.castor.builder.FactoryState.setParent(), org.exolab.castor.builder.XMLInfo.setSchemaType(), org.exolab.javasource.JClass.setSuperClass(), org.exolab.castor.builder.binding.XMLBindingComponent.setView(), and org.exolab.castor.builder.SGStateInfo.verbose().

JClass org.exolab.castor.builder.SourceFactory.createSourceCode ( SimpleType  simpleType,
SGStateInfo  sgState 
)

Creates the Java source code to support the given Simpletype

Parameters:
simpleType the Simpletype to create the Java source for
sgState the current SGStateInfo (cannot be null).
Returns:
the JClass representation of the given Simpletype

References org.exolab.castor.xml.schema.Structure.ATTRIBUTE, org.exolab.castor.builder.util.ClassInfoResolverImpl.bindReference(), org.exolab.castor.builder.FactoryState.classInfo, org.exolab.castor.builder.SGStateInfo.getCurrentFactoryState(), org.exolab.castor.builder.SGStateInfo.getDialog(), org.exolab.castor.builder.binding.XMLBindingComponent.getJavaPackage(), org.exolab.castor.builder.ClassInfo.getJClass(), org.exolab.javasource.JStructure.getJDocComment(), org.exolab.javasource.JType.getLocalName(), org.exolab.castor.xml.schema.XMLType.getName(), org.exolab.castor.xml.schema.XMLType.getSchema(), org.exolab.castor.xml.schema.SimpleType.getStructureType(), org.exolab.castor.builder.SGStateInfo.getSuppressNonFatalWarnings(), org.exolab.castor.xml.schema.Schema.getTargetNamespace(), org.exolab.castor.xml.schema.SimpleType.getTypeCode(), org.exolab.castor.builder.FactoryState.hasBoundProperties(), org.exolab.castor.xml.schema.SimpleType.hasFacet(), org.exolab.castor.builder.FactoryState.jClass, org.exolab.castor.builder.util.Dialog.notify(), org.exolab.castor.builder.SGStateInfo.packageName, org.exolab.castor.builder.util.ClassInfoResolverImpl.resolve(), org.exolab.castor.builder.types.XSType.setAsEnumerated(), org.exolab.castor.builder.binding.XMLBindingComponent.setBinding(), org.exolab.javasource.JDocComment.setComment(), org.exolab.castor.builder.XMLInfo.setNamespaceURI(), org.exolab.castor.builder.XMLInfo.setNodeName(), org.exolab.castor.builder.FactoryState.setParent(), org.exolab.castor.builder.XMLInfo.setSchemaType(), and org.exolab.castor.builder.binding.XMLBindingComponent.setView().

static void org.exolab.castor.builder.SourceFactory.createTestableMethods ( JClass  jclass  )  [static]
void org.exolab.castor.builder.SourceFactory.setCreateExtraMethods ( boolean  extraMethods  ) 

Sets whether or not to create extra collection methods for accessing the actual collection

Parameters:
extraMethods a boolean that when true indicates that extra collection accessor methods should be created. False by default.
See also:
setReferenceMethodSuffix

References org.exolab.castor.builder.FieldInfoFactory.setCreateExtraMethods().

void org.exolab.castor.builder.SourceFactory.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.

Parameters:
createMarshalMethods a boolean, when true indicates to generated the marshalling framework methods

Referenced by org.exolab.castor.builder.SourceGenerator.setCreateMarshalMethods().

void org.exolab.castor.builder.SourceFactory.setReferenceMethodSuffix ( String  suffix  ) 

Sets the method suffix (ending) to use when creating the extra collection methods.

Parameters:
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.
See also:
setCreateExtraMethods

References org.exolab.castor.builder.FieldInfoFactory.setReferenceMethodSuffix().

void org.exolab.castor.builder.SourceFactory.setSAX1 ( boolean  sax1  ) 

Sets to true if SAX1 should be used in the marshall method.

Parameters:
sax1 true if SAX1 should be used.

Referenced by org.exolab.castor.builder.SourceGenerator.setSAX1().

void org.exolab.castor.builder.SourceFactory.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.

Parameters:
testable a boolean, when true indicates to generate testing framework methods

Referenced by org.exolab.castor.builder.SourceGenerator.setTestable().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties