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) |
This class creates the Java Source classes for Schema components
org.exolab.castor.builder.SourceFactory.SourceFactory | ( | BuilderConfiguration | config | ) |
Creates a new SourceFactory using the default FieldInfo factory.
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
config | the BuilderConfiguration instance (must not be null). | |
infoFactory | the FieldInfoFactory to use |
static void org.exolab.castor.builder.SourceFactory.createEqualsMethod | ( | JClass | jclass | ) | [static] |
Create an 'equals' method on the given JClass
jclass | the Jclass in which we create the equals method |
References org.exolab.javasource.JSourceCode.add(), org.exolab.javasource.JClass.addMethod(), org.exolab.javasource.JMethod.addParameter(), org.exolab.javasource.JSourceCode.append(), org.exolab.javasource.JClass.getFields(), org.exolab.javasource.JField.getName(), org.exolab.javasource.JStructure.getName(), org.exolab.javasource.JMethod.getSourceCode(), org.exolab.javasource.JClass.getSuperClass(), org.exolab.javasource.JField.getType(), org.exolab.javasource.JSourceCode.indent(), org.exolab.javasource.JType.isPrimitive(), org.exolab.javasource.JMethod.setComment(), and org.exolab.javasource.JSourceCode.unindent().
Referenced by org.exolab.castor.builder.SourceFactory.createSourceCode().
JClass [] org.exolab.castor.builder.SourceFactory.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. |
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
simpleType | the Simpletype to create the Java source for | |
sgState | the current SGStateInfo (cannot be null). |
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] |
Implement org.exolab.castor.tests.framework.CastorTestable im the given JClass
jclass | the JCLass which will implement the CastorTestable Interface |
References org.exolab.javasource.JSourceCode.add(), org.exolab.javasource.JMethod.addException(), org.exolab.javasource.JStructure.addImport(), org.exolab.javasource.JStructure.addInterface(), org.exolab.javasource.JClass.addMethod(), org.exolab.javasource.JSourceCode.append(), org.exolab.javasource.JClass.getFields(), org.exolab.javasource.JClass.getMethod(), org.exolab.javasource.JStructure.getName(), org.exolab.javasource.JType.getName(), org.exolab.javasource.JField.getName(), org.exolab.javasource.JMethod.getReturnType(), org.exolab.javasource.JMethod.getSourceCode(), org.exolab.javasource.JField.getType(), org.exolab.javasource.JSourceCode.indent(), org.exolab.javasource.JType.isPrimitive(), org.exolab.javasource.JMethod.setComment(), and org.exolab.javasource.JSourceCode.unindent().
void org.exolab.castor.builder.SourceFactory.setCreateExtraMethods | ( | boolean | extraMethods | ) |
Sets whether or not to create extra collection methods for accessing the actual collection
extraMethods | a boolean that when true indicates that extra collection accessor methods should be created. False by default. |
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.
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.
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. |
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.
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.
testable | a boolean, when true indicates to generate testing framework methods |
Referenced by org.exolab.castor.builder.SourceGenerator.setTestable().