Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/BaseFactory.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/BaseFactory.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/BaseFactory.java (working copy) @@ -24,12 +24,14 @@ public class BaseFactory { /** The BuilderConfiguration instance, for callbacks to obtain certain - * configured properties. */ - protected final BuilderConfiguration _config; + * configured properties. */ + private final BuilderConfiguration _config; + /** The type factory. */ - protected final FieldInfoFactory _infoFactory; + private final FieldInfoFactory _infoFactory; + /** A GroupNaming helper class used to named anonymous groups. */ - protected GroupNaming _groupNaming = null; + private GroupNaming _groupNaming = null; /** * Creates an instance of this class. @@ -52,7 +54,25 @@ } _groupNaming = groupNaming; } - + + /** + * Get BuilderConfiguration instance, for callbacks to obtain certain configured properties. + * + * @return BuilderConfiguration instance. + */ + protected final BuilderConfiguration getConfig() { + return _config; + } + + /** + * Get type factory. + * + * @return Type factory. + */ + protected final FieldInfoFactory getInfoFactory() { + return _infoFactory; + } + /** * Normalizes the given string for use in comments. * @@ -100,6 +120,7 @@ /** * Returns the group naming helper class for naming nested anonymous groups. + * * @return the group naming helper class for naming nested anonymous groups. */ public final GroupNaming getGroupNaming() { Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/BuilderConfiguration.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/BuilderConfiguration.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/BuilderConfiguration.java (working copy) @@ -66,6 +66,17 @@ * @version $Revision$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $ */ public class BuilderConfiguration { + /** String representation of directory self pointer. */ + private static final String SELF_DIRECTORY = "./"; + + /** Length of string representation of directory self pointer. */ + private static final int SELF_DIRECTORY_LENGTH = SELF_DIRECTORY.length(); + + /** String representation of directory parent pointer. */ + private static final String PARENT_DIRECTORY = "../"; + + /** Length of string representation of directory parent pointer. */ + private static final int PARENT_DIRECTORY_LENGTH = PARENT_DIRECTORY.length(); /** * Names of properties used in the configuration file. @@ -495,7 +506,8 @@ * @param schemaLocation the schemaLocation to map * @param packageName the package name to map to */ - public final void setLocationPackageMapping(final String schemaLocation, final String packageName) { + public final void setLocationPackageMapping( + final String schemaLocation, final String packageName) { _locpackages.put(schemaLocation, packageName); } @@ -599,10 +611,10 @@ String cleanedSchemaLocation = schemaLocation; //--maybe a relative schemaLocation was given while (schemaLocation.startsWith(".")) { - if (schemaLocation.startsWith("./")) { - cleanedSchemaLocation = schemaLocation.substring(2); - } else if (schemaLocation.startsWith("../")) { - cleanedSchemaLocation = schemaLocation.substring(3); + if (schemaLocation.startsWith(SELF_DIRECTORY)) { + cleanedSchemaLocation = schemaLocation.substring(SELF_DIRECTORY_LENGTH); + } else if (schemaLocation.startsWith(PARENT_DIRECTORY)) { + cleanedSchemaLocation = schemaLocation.substring(PARENT_DIRECTORY_LENGTH); } } Enumeration keys = _locpackages.keys(); Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/EnumerationFactory.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/EnumerationFactory.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/EnumerationFactory.java (working copy) @@ -75,7 +75,7 @@ */ public EnumerationFactory(final BuilderConfiguration config, final GroupNaming groupNaming) { super(config, null, groupNaming); - _typeConversion = new TypeConversion(_config); + _typeConversion = new TypeConversion(getConfig()); // TODO[WG]: add code to read in max. value from builder property file _maxEnumerationsPerClass = config.getMaximumNumberOfConstants(); @@ -101,7 +101,7 @@ Enumeration enumeration = simpleType.getFacets("enumeration"); - XMLBindingComponent component = new XMLBindingComponent(_config, getGroupNaming()); + XMLBindingComponent component = new XMLBindingComponent(getConfig(), getGroupNaming()); if (binding != null) { component.setBinding(binding); component.setView(simpleType); @@ -114,7 +114,7 @@ enumeration = simpleType.getFacets("enumeration"); - JClass jClass = state._jClass; + JClass jClass = state.getJClass(); String className = jClass.getLocalName(); if (component.getJavaClassName() != null) { @@ -123,7 +123,8 @@ jClass.addImport("java.util.Hashtable"); JField field = null; - JField fHash = new JField(SGTypes.createHashtable(_config.useJava50()), "_memberTable"); + JField fHash = new JField( + SGTypes.createHashtable(getConfig().useJava50()), "_memberTable"); fHash.setInitString("init()"); fHash.getModifiers().setStatic(true); @@ -133,7 +134,7 @@ JConstructor constructor = jClass.getConstructor(0); constructor.getModifiers().makePrivate(); constructor.addParameter(new JParameter(JType.INT, "type")); - constructor.addParameter(new JParameter(SGTypes.String, "value")); + constructor.addParameter(new JParameter(SGTypes.STRING, "value")); jsc = constructor.getSourceCode(); jsc.add("this.type = type;"); jsc.add("this.stringValue = value;"); @@ -138,19 +139,10 @@ jsc.add("this.type = type;"); jsc.add("this.stringValue = value;"); - //-- #valueOf method createValueOfMethod(jClass, className); - - //-- #enumerate method createEnumerateMethod(jClass, className); - - //-- #toString method createToStringMethod(jClass, className); - - //-- #init method createInitMethod(jClass); - - //-- #readResolve method createReadResolveMethod(jClass); //-- Loop through "enumeration" facets @@ -230,7 +222,7 @@ jsc.append("\", "); } if (generateConstantDefinitions) { - jsc.append(objName); + jsc.append(objName); } else { StringBuffer init = new StringBuffer(); init.append("new "); @@ -263,7 +255,7 @@ jClass.addField(field); //-- add internal stringValue - field = new JField(SGTypes.String, "stringValue"); + field = new JField(SGTypes.STRING, "stringValue"); field.setInitString("null"); jClass.addField(field); @@ -349,7 +341,7 @@ private void createReadResolveMethod(final JClass jClass) { JDocComment jdc; JSourceCode jsc; - JMethod mReadResolve = new JMethod("readResolve", SGTypes.Object, + JMethod mReadResolve = new JMethod("readResolve", SGTypes.OBJECT, "this deserialized object"); mReadResolve.getModifiers().makePrivate(); jClass.addMethod(mReadResolve); @@ -368,12 +360,13 @@ */ private JMethod createInitMethod(final JClass jClass) { final String initMethodName = getInitMethodName(_maxSuffix); - JMethod mInit = new JMethod(initMethodName, SGTypes.createHashtable(_config.useJava50()), - "the initialized Hashtable for the member table"); + JMethod mInit = new JMethod(initMethodName, + SGTypes.createHashtable(getConfig().useJava50()), + "the initialized Hashtable for the member table"); jClass.addMethod(mInit); mInit.getModifiers().makePrivate(); mInit.getModifiers().setStatic(true); - if (_config.useJava50()) { + if (getConfig().useJava50()) { mInit.getSourceCode().add("Hashtable members" + " = new Hashtable();"); } else { @@ -388,7 +381,7 @@ * @param className The name of the class. */ private void createToStringMethod(final JClass jClass, final String className) { - JMethod mToString = new JMethod("toString", SGTypes.String, + JMethod mToString = new JMethod("toString", SGTypes.STRING, "the String representation of this " + className); jClass.addMethod(mToString); JDocComment jdc = mToString.getJDocComment(); @@ -403,9 +396,9 @@ * @param className The name of the class. */ private void createEnumerateMethod(final JClass jClass, final String className) { - // TODO: for the time being return Enumeration for Java 5.0; change + // TODO for the time being return Enumeration for Java 5.0; change JMethod mEnumerate = new JMethod("enumerate", - SGTypes.createEnumeration(SGTypes.Object, _config.useJava50()), + SGTypes.createEnumeration(SGTypes.OBJECT, getConfig().useJava50()), "an Enumeration over all possible instances of " + className); mEnumerate.getModifiers().setStatic(true); jClass.addMethod(mEnumerate); @@ -421,9 +414,9 @@ * @param className The name of the class. */ private void createValueOfMethod(final JClass jClass, final String className) { - JMethod mValueOf = new JMethod("valueOf", jClass, - "the " + className + " value of parameter 'string'"); - mValueOf.addParameter(new JParameter(SGTypes.String, "string")); + JMethod mValueOf = new JMethod( + "valueOf", jClass, "the " + className + " value of parameter 'string'"); + mValueOf.addParameter(new JParameter(SGTypes.STRING, "string")); mValueOf.getModifiers().setStatic(true); jClass.addMethod(mValueOf); @@ -432,26 +425,16 @@ jdc.appendComment(" based on the given String value."); JSourceCode jsc = mValueOf.getSourceCode(); - jsc.add("java.lang.Object obj = null;"); - jsc.add("if (string != null) {"); - if (_caseInsensitive) { - jsc.append("obj = _memberTable.get(string.toLowerCase());"); - } else { - jsc.append("obj = _memberTable.get(string);"); - } - jsc.append(" }"); - - jsc.add("if (obj == null) {"); - jsc.indent(); - jsc.add("String err = \"'\" + string + \"' is not a valid "); - jsc.append(className); - jsc.append("\";"); - jsc.add("throw new IllegalArgumentException(err);"); - jsc.unindent(); - jsc.add("}"); - jsc.add("return ("); - jsc.append(className); - jsc.append(") obj;"); + jsc.add("java.lang.Object obj = null;\n" + + "if (string != null) {\n" + + " obj = _memberTable.get(string{1});\n" + + "}\n" + + "if (obj == null) {\n" + + " String err = \"'\" + string + \"' is not a valid {0}\";\n" + + " throw new IllegalArgumentException(err);\n" + + "}\n" + + "return ({0}) obj;", className, (_caseInsensitive ? ".toLowerCase()" : "")); + } /** @@ -486,7 +469,7 @@ if (base == null) { baseType = new XSString(); } else { - baseType = _typeConversion.convertType(base, _config.useJava50()); + baseType = _typeConversion.convertType(base, getConfig().useJava50()); } Enumeration enumeration = simpleType.getFacets("enumeration"); @@ -491,7 +474,7 @@ Enumeration enumeration = simpleType.getFacets("enumeration"); - JClass jClass = state._jClass; + JClass jClass = state.getJClass(); String className = jClass.getLocalName(); JField fValues = null; @@ -502,7 +485,8 @@ JConstructor constructor = jClass.getConstructor(0); constructor.getModifiers().makePrivate(); - fValues = new JField(new JArrayType(baseType.getJType(), _config.useJava50()), "values"); + fValues = new JField(new JArrayType( + baseType.getJType(), getConfig().useJava50()), "values"); //-- Loop through "enumeration" facets //-- and create the default values for the type. @@ -546,7 +530,7 @@ //-- #valueOf method JMethod method = new JMethod("valueOf", jClass, "the String value of the provided " + baseType.getJType()); - method.addParameter(new JParameter(SGTypes.String, "string")); + method.addParameter(new JParameter(SGTypes.STRING, "string")); method.getModifiers().setStatic(true); jClass.addMethod(method); jdc = method.getJDocComment(); @@ -614,9 +598,9 @@ sb.append(customMemberName); } else { sb.append(enumValue.toUpperCase()); - char c; - for (int i = 0; i < sb.length(); i++) { - c = sb.charAt(i); + int i = 0; + while (i < sb.length()) { + char c = sb.charAt(i); if ("[](){}<>'`\"".indexOf(c) >= 0) { sb.deleteCharAt(i); i--; @@ -623,10 +607,11 @@ } else if (Character.isWhitespace(c) || "\\/?~!@#$%^&*-+=:;.,".indexOf(c) >= 0) { sb.setCharAt(i, '_'); } + i++; } } return sb.toString(); - } //-- translateEnumValueToIdentifier + } /** * Set to true if enumerated type lookups should be performed in a case Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/FactoryState.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/FactoryState.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/FactoryState.java (working copy) @@ -68,32 +68,33 @@ //--------------------/ /** The JClass for which we are currently generating code. */ - JClass _jClass = null; + private final JClass _jClass; + /** A ClassInfo for _jClass. */ - ClassInfo _classInfo = null; + private final ClassInfo _classInfo; + /** A FieldInfo used to handle xsd:choice. */ - FieldInfo _fieldInfoForChoice = null; + private FieldInfo _fieldInfoForChoice = null; + /** Package for the class currently being generated. */ - String _packageName = null; + private final String _packageName; /** Our ClassInfoResolver to keep track of ClassInfos for easy lookup. */ private ClassInfoResolver _resolver = null; + /** Keeps track of which classes have been processed. */ private Vector _processed = null; + /** SourceGenerator state. */ private SGStateInfo _sgState = null; + /** If true, we are currently generating code for a group. */ private boolean _createGroupItem = false; - /** - * Keeps track of whether or not the BoundProperties methods have been - * created. - */ + /** Keeps track of whether or not the BoundProperties methods have been created. */ private boolean _bound = false; - /** - * Keeps track of the different FactoryState. - */ + /** Keeps track of the different FactoryState. */ private FactoryState _parent = null; //----------------/ @@ -125,7 +126,7 @@ _resolver = sgState; - this._packageName = packageName; + _packageName = packageName; //-- boundProperties _bound = sgState.getSourceGenerator().boundPropertiesEnabled(); @@ -134,6 +135,51 @@ //-----------/ //- Methods -/ //-----------/ + + /** + * Get JClass for which we are currently generating code. + * + * @return JClass for which we are currently generating code. + */ + protected final JClass getJClass() { + return _jClass; + } + + /** + * Get ClassInfo for _jClass. + * + * @return ClassInfo for _jClass. + */ + protected final ClassInfo getClassInfo() { + return _classInfo; + } + + /** + * Get FieldInfo used to handle xsd:choice. + * + * @return FieldInfo used to handle xsd:choice. + */ + protected final FieldInfo getFieldInfoForChoice() { + return _fieldInfoForChoice; + } + + /** + * Set FieldInfo used to handle xsd:choice. + * + * @param fieldInfoForChoice FieldInfo used to handle xsd:choice. + */ + protected final void setFieldInfoForChoice(final FieldInfo fieldInfoForChoice) { + _fieldInfoForChoice = fieldInfoForChoice; + } + + /** + * Get package for the class currently being generated. + * + * @return Package for the class currently being generated. + */ + protected final String getPackageName() { + return _packageName; + } /** * Adds the given Reference to this ClassInfo resolver. Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/MappingFileSourceFactory.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/MappingFileSourceFactory.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/MappingFileSourceFactory.java (working copy) @@ -56,7 +56,6 @@ import org.exolab.castor.mapping.xml.MapTo; import org.exolab.castor.mapping.xml.types.BindXmlNodeType; import org.exolab.javasource.JClass; -import org.exolab.javasource.JPrimitiveType; import org.exolab.javasource.JType; /** @@ -115,7 +114,7 @@ //-- set grouping compositor if (classInfo.isChoice()) { - //-- TODO: need a way to specify choice in Mapping file + // TODO need a way to specify choice in Mapping file } boolean isAbstract = classInfo.isAbstract(); @@ -277,7 +276,7 @@ // nsURI = null; // } - //-- required + // required if (member.isRequired()) { fieldMap.setRequired(true); } @@ -282,12 +281,12 @@ fieldMap.setRequired(true); } - //-- nillable + // nillable if (member.isNillable()) { - // TODO: Mapping file needs nillable support! + // TODO Mapping file needs nillable support! } - //-- if any it can match all the names + // if any it can match all the names if (any) { bindXml.setMatches("*"); } @@ -292,10 +291,10 @@ bindXml.setMatches("*"); } - //-- Add Validation Code - // TODO: mapping file has no validation support so users need to use xsi:schemaLocation + // Add Validation Code + // TODO mapping file has no validation support so users need to use xsi:schemaLocation // in their XML instances and enable schema validation on the parser - } //-- createFieldMapping + } /** * Returns the classname for the given JType. The class name may be the @@ -306,7 +305,7 @@ * @return the classname for the given XSType */ private static String getClassName(final JType jType) { - // TODO: Look up short names from: org.exolab.castor.mapping.loader.Types + // TODO Look up short names from: org.exolab.castor.mapping.loader.Types if (jType.isPrimitive()) { return jType.getName(); @@ -312,6 +311,5 @@ return jType.getName(); } return jType.toString(); - } //-- classType - -} //-- DescriptorSourceFactory + } +} Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/MemberFactory.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/MemberFactory.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/MemberFactory.java (working copy) @@ -98,14 +98,14 @@ final FieldInfoFactory infoFactory, final GroupNaming groupNaming) { super(config, infoFactory, groupNaming); - if (_config.generateExtraCollectionMethods()) { - this._infoFactory.setCreateExtraMethods(true); + if (getConfig().generateExtraCollectionMethods()) { + this.getInfoFactory().setCreateExtraMethods(true); } - String suffix = _config.getProperty(CollectionInfo.REFERENCE_SUFFIX_PROPERTY, null); - this._infoFactory.setReferenceMethodSuffix(suffix); + String suffix = getConfig().getProperty(CollectionInfo.REFERENCE_SUFFIX_PROPERTY, null); + this.getInfoFactory().setReferenceMethodSuffix(suffix); - if (_config.boundPropertiesEnabled()) { - this._infoFactory.setBoundProperties(true); + if (getConfig().boundPropertiesEnabled()) { + this.getInfoFactory().setBoundProperties(true); } } //-- MemberFactory @@ -127,7 +127,7 @@ return null; } - XSType xsType = new XSClass(SGTypes.Object, "any"); + XSType xsType = new XSClass(SGTypes.OBJECT, "any"); String vName = "_anyObject"; String xmlName = null; FieldInfo result = null; @@ -133,7 +133,7 @@ FieldInfo result = null; if (any.getMaxOccurs() > 1 || any.getMaxOccurs() < 0) { - result = this._infoFactory.createCollection(xsType, vName, "anyObject", useJava50); + result = this.getInfoFactory().createCollection(xsType, vName, "anyObject", useJava50); XSList xsList = ((CollectionInfo) result).getXSList(); xsList.setMinimumSize(any.getMinOccurs()); xsList.setMaximumSize(any.getMaxOccurs()); @@ -138,7 +138,7 @@ xsList.setMinimumSize(any.getMinOccurs()); xsList.setMaximumSize(any.getMaxOccurs()); } else { - result = this._infoFactory.createFieldInfo(xsType, vName); + result = this.getInfoFactory().createFieldInfo(xsType, vName); } if (any.getMinOccurs() > 0) { @@ -175,9 +175,9 @@ */ public FieldInfo createFieldInfoForChoiceValue() { String fieldName = "_choiceValue"; - XSType xsType = new XSClass(SGTypes.Object, "any"); + XSType xsType = new XSClass(SGTypes.OBJECT, "any"); FieldInfo fInfo = null; - fInfo = this._infoFactory.createFieldInfo(xsType, fieldName); + fInfo = this.getInfoFactory().createFieldInfo(xsType, fieldName); fInfo.setNodeType(XMLInfo.ELEMENT_TYPE); fInfo.setComment("Internal choice value storage"); fInfo.setRequired(false); @@ -198,11 +198,11 @@ String fieldName = "_content"; //new xsType()??? FieldInfo fInfo = null; if (xsType.getType() == XSType.COLLECTION) { - fInfo = this._infoFactory.createCollection(((XSList) xsType).getContentType(), + fInfo = this.getInfoFactory().createCollection(((XSList) xsType).getContentType(), fieldName, null, useJava50); } else { - fInfo = this._infoFactory.createFieldInfo(xsType, fieldName); + fInfo = this.getInfoFactory().createFieldInfo(xsType, fieldName); } fInfo.setNodeType(XMLInfo.TEXT_TYPE); fInfo.setComment("internal content storage"); @@ -282,7 +282,7 @@ xsType = classInfo.getSchemaType(); } if (xsType == null) { - xsType = new XSClass(SGTypes.Object); + xsType = new XSClass(SGTypes.OBJECT); } } else if (xmlType.isComplexType() && (xmlType.getName() != null)) { //--if we use the type method then no class is output for @@ -287,8 +287,9 @@ } else if (xmlType.isComplexType() && (xmlType.getName() != null)) { //--if we use the type method then no class is output for //--the element we are processing - if (_config.mappingSchemaType2Java()) { - XMLBindingComponent temp = new XMLBindingComponent(_config, _groupNaming); + if (getConfig().mappingSchemaType2Java()) { + XMLBindingComponent temp = new XMLBindingComponent( + getConfig(), getGroupNaming()); temp.setBinding(component.getBinding()); temp.setView(xmlType); ClassInfo typeInfo = resolver.resolve(xmlType); @@ -295,7 +296,7 @@ if (typeInfo != null) { // if we have not processed the referenced // by the ClassInfo yet, this will return null - // TODO: find a way to resolve an unprocessed + // TODO find a way to resolve an unprocessed xsType = typeInfo.getSchemaType(); } else { String className = temp.getQualifiedName(); @@ -309,7 +310,7 @@ } } } - } //--complexType + } // complexType } else { if (xsType == null) { xsType = component.getJavaType(); @@ -321,7 +322,7 @@ switch (component.getAnnotated().getStructureType()) { case Structure.ATTRIBUTE: case Structure.ELEMENT: - xsType = new XSClass(SGTypes.Object); + xsType = new XSClass(SGTypes.OBJECT); break; default: // probably a model-group @@ -330,7 +331,7 @@ } } - //--is the XSType found? + // is the XSType found? if (xsType == null) { String className = component.getQualifiedName(); JClass jClass = new JClass(className); @@ -344,8 +345,8 @@ className = null; } - //--create the fieldInfo - //-- check whether this should be a collection or not + // create the fieldInfo + // check whether this should be a collection or not int maxOccurs = component.getUpperBound(); int minOccurs = component.getLowerBound(); if (simpleTypeCollection @@ -352,11 +353,11 @@ || ((maxOccurs < 0 || maxOccurs > 1) && !(memberName.endsWith("Choice")))) { String vName = memberName + "List"; - //--if xmlName is null it means that - //--we are processing a container object (group) - //--so we need to adjust the name of the members of the collection + // if xmlName is null it means that + // we are processing a container object (group) + // so we need to adjust the name of the members of the collection CollectionInfo cInfo; - cInfo = this._infoFactory.createCollection(xsType, vName, memberName, + cInfo = this.getInfoFactory().createCollection(xsType, vName, memberName, component.getCollectionType(), useJava50); XSList xsList = cInfo.getXSList(); @@ -368,7 +369,7 @@ } else { switch (xsType.getType()) { case XSType.ID_TYPE: - fieldInfo = this._infoFactory.createIdentity(memberName); + fieldInfo = this.getInfoFactory().createIdentity(memberName); break; case XSType.COLLECTION: String collectionName = component.getCollectionType(); @@ -373,7 +374,7 @@ case XSType.COLLECTION: String collectionName = component.getCollectionType(); XSType contentType = ((XSList) xsType).getContentType(); - fieldInfo = this._infoFactory.createCollection(contentType, + fieldInfo = this.getInfoFactory().createCollection(contentType, memberName, memberName, collectionName, useJava50); break; @@ -378,7 +379,7 @@ collectionName, useJava50); break; default: - fieldInfo = this._infoFactory.createFieldInfo(xsType, memberName); + fieldInfo = this.getInfoFactory().createFieldInfo(xsType, memberName); break; } } @@ -383,7 +384,7 @@ } } - //--initialize the field + // initialize the field fieldInfo.setNodeName(xmlName); fieldInfo.setRequired(minOccurs > 0); switch (component.getAnnotated().getStructureType()) { @@ -463,7 +464,7 @@ value = "\"\""; } - //-- TODO: Need to change this...and to validate the value...to be done at reading time. + // TODO Need to change this...and to validate the value...to be done at reading time. //-- clean up value //-- if the xsd field is mapped into a java.lang.String Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SGStateInfo.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SGStateInfo.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SGStateInfo.java (working copy) @@ -83,8 +83,10 @@ private Hashtable _mappings = null; /** The in memory package listings for each package. */ private Hashtable _packageListings = null; + /** The package used when creating new classes. */ - protected String _packageName = null; + private String _packageName; + /** Keeps track of which JClass files have been processed. */ private Vector _processed = null; /** true if existing source files should not be silently overwritten. */ @@ -117,8 +119,6 @@ */ private Map _importedSourcesByName = new HashMap(); -// private XMLBindingComponent _bindingComponent = null; - /** * Creates a new SGStateInfo. * @@ -132,7 +132,25 @@ _processed = new Vector(); _dialog = new ConsoleDialog(); _sgen = sgen; - } //-- SGStateInfo + } + + /** + * Get package used when creating new classes. + * + * @return Package used when creating new classes. + */ + protected String getPackageName() { + return _packageName; + } + + /** + * Set package used when creating new classes. + * + * @param packageName Package used when creating new classes. + */ + protected void setPackageName(final String packageName) { + _packageName = packageName; + } /** * Binds the given Annotated structure with its generated source classes. Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SGTypes.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SGTypes.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SGTypes.java (working copy) @@ -53,62 +53,33 @@ * @version $Revision$ $Date: 2005-10-10 06:35:52 -0600 (Mon, 10 Oct 2005) $ */ public class SGTypes { - /** * As a static utility class, we want a private constructor. */ - private SGTypes() { - // As a static utility class, we want a private constructor - } - - //-----------------------/ - //- org.xml.sax Objects -/ - //-----------------------/ + private SGTypes() { } - public static final JClass SAXException = new JClass("org.xml.sax.SAXException"); - - //---------------------------/ - //- org.exolab.castor types -/ - //---------------------------/ - - public static final JClass UnmarshalException = - new JClass("org.exolab.castor.xml.UnmarshalException"); - - public static final JClass MarshalException = + public static final JClass MARSHAL_EXCEPTION = new JClass("org.exolab.castor.xml.MarshalException"); - public static final JClass ValidationException = + public static final JClass VALIDATION_EXCEPTION = new JClass("org.exolab.castor.xml.ValidationException"); - //---------------/ - //- JDK Objects -/ - //---------------/ - - //-- java.lang - public static final JClass IllegalStateException = - new JClass("java.lang.IllegalStateException"); + public static final JClass INDEX_OUT_OF_BOUNDS_EXCEPTION = + new JClass("java.lang.IndexOutOfBoundsException"); - public static final JClass IndexOutOfBoundsException = - new JClass("java.lang.IndexOutOfBoundsException"); + public static final JClass CLASS = new JClass("java.lang.Class"); - public static final JClass InstantiationException = - new JClass("java.lang.InstantiationException"); + public static final JClass OBJECT = new JClass("java.lang.Object"); + + public static final JClass STRING = new JClass("java.lang.String"); - public static final JClass Class = new JClass("java.lang.Class"); - public static final JClass Object = new JClass("java.lang.Object"); - public static final JClass String = new JClass("java.lang.String"); - public static final JClass StringBuffer = new JClass("java.lang.StringBuffer"); + public static final JClass IO_EXCEPTION = new JClass("java.io.IOException"); - //-- java.io - public static final JClass FileReader = new JClass("java.io.FileReader"); - public static final JClass FileWriter = new JClass("java.io.FileWriter"); - public static final JClass IOException = new JClass("java.io.IOException"); - public static final JClass PrintWriter = new JClass("java.io.PrintWriter"); - public static final JClass Reader = new JClass("java.io.Reader"); - public static final JClass Writer = new JClass("java.io.Writer"); + public static final JClass READER = new JClass("java.io.Reader"); + + public static final JClass WRITER = new JClass("java.io.Writer"); - //-- java.beans - public static final JClass PropertyChangeSupport = + public static final JClass PROPERTY_CHANGE_SUPPORT = new JClass("java.beans.PropertyChangeSupport"); public static final JType createEnumeration(final JType jType, final boolean usejava50) { @@ -119,14 +90,6 @@ return new JCollectionType("java.util.Iterator", jType, usejava50); } - public static final JType createVector(final JType jType, final boolean usejava50) { - return new JCollectionType("java.util.Vector", jType, usejava50); - } - - public static final JType createArrayList(final JType jType, final boolean usejava50) { - return new JCollectionType("java.util.List", "java.util.ArrayList", jType, usejava50); - } - public static final JType createHashtable(final boolean useJava50) { if (useJava50) { return new JClass("java.util.Hashtable"); @@ -133,5 +96,4 @@ } return new JClass("java.util.Hashtable"); } - -} //-- SGTypes +} Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SingleClassGenerator.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SingleClassGenerator.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SingleClassGenerator.java (working copy) @@ -316,9 +316,9 @@ desc.print(_destDir, _lineSeparator); } } else { - //-- TODO: cleanup mapping file integration (what does this TODO mean?) - //-- create a class mapping - String pkg = state._packageName; + // TODO cleanup mapping file integration (what does this TODO mean?) + // create a class mapping + String pkg = state.getPackageName(); if (pkg == null) { pkg = ""; } @@ -389,7 +389,7 @@ } if (JNaming.isReservedByWindows(nameToCompare)) { - // FIXME: We should fail under Windows and warn under other OSes + // FIXME We should fail under Windows and warn under other OSes String warn = "'" + nameToCompare + "' is reserved by the Windows filesystem and" + " cannot be\nused as a class name. Windows will not allow you to create" + " a file with this\nname. You will have to use a mapping file or change" Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SourceFactory.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SourceFactory.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SourceFactory.java (working copy) @@ -86,7 +86,6 @@ import org.exolab.castor.xml.schema.XMLType; import org.exolab.javasource.JAnnotation; import org.exolab.javasource.JAnnotationType; -import org.exolab.javasource.JArrayType; import org.exolab.javasource.JClass; import org.exolab.javasource.JCollectionType; import org.exolab.javasource.JConstructor; @@ -95,7 +94,6 @@ import org.exolab.javasource.JField; import org.exolab.javasource.JMethod; import org.exolab.javasource.JParameter; -import org.exolab.javasource.JPrimitiveType; import org.exolab.javasource.JSourceCode; import org.exolab.javasource.JType; @@ -120,9 +118,9 @@ /** The current Binding for which we are creating classes. */ private ExtendedBinding _binding = null; /** The member factory. */ - private MemberFactory memberFactory = null; + private MemberFactory _memberFactory = null; - private short enumerationType = OBJECT_TYPE_ENUMERATION; + private short _enumerationType = OBJECT_TYPE_ENUMERATION; /** * A flag indicating whether or not to generate XML marshalling framework @@ -140,7 +138,7 @@ /** The TypeConversion instance to use for mapping SimpleTypes into XSTypes. */ private TypeConversion _typeConversion = null; /** Enumeration factory used to create code for enumerations. */ - private EnumerationFactory _enumerationFactory; + private final EnumerationFactory _enumerationFactory; /** * Creates a new SourceFactory with the given FieldInfoFactory. @@ -157,9 +155,9 @@ // set the config into the info factory (CASTOR-1346) infoFactory.setBoundProperties(config.boundPropertiesEnabled()); - this.memberFactory = new MemberFactory(config, infoFactory, _groupNaming); - this._typeConversion = new TypeConversion(_config); - this._enumerationFactory = new EnumerationFactory(_config, _groupNaming); + this._memberFactory = new MemberFactory(config, infoFactory, getGroupNaming()); + this._typeConversion = new TypeConversion(getConfig()); + this._enumerationFactory = new EnumerationFactory(getConfig(), getGroupNaming()); } //-- SourceFactory /** @@ -186,7 +184,7 @@ * @see org.exolab.castor.builder.SourceFactory#setReferenceMethodSuffix */ public void setCreateExtraMethods(final boolean extraMethods) { - _infoFactory.setCreateExtraMethods(extraMethods); + getInfoFactory().setCreateExtraMethods(extraMethods); } //-- setCreateExtraMethods /** @@ -200,7 +198,7 @@ * @see org.exolab.castor.builder.SourceFactory#setCreateExtraMethods */ public void setReferenceMethodSuffix(final String suffix) { - _infoFactory.setReferenceMethodSuffix(suffix); + getInfoFactory().setReferenceMethodSuffix(suffix); } //-- setReferenceMethodSuffix /** @@ -275,7 +273,7 @@ //0-- set the packageName String packageName = component.getJavaPackage(); if (packageName == null || packageName.length() == 0) { - packageName = sgState._packageName; + packageName = sgState.getPackageName(); } //1-- get the name @@ -320,8 +318,8 @@ ////////////////////////////////////////////////////// //4-- intialization of the JClass - ClassInfo classInfo = state._classInfo; - JClass jClass = state._jClass; + ClassInfo classInfo = state.getClassInfo(); + JClass jClass = state.getJClass(); initialize(jClass); //-- name information @@ -356,7 +354,7 @@ } } else if (type.isAnyType()) { //-- Do not create classes for AnyType - classInfo.setSchemaType(new XSClass(SGTypes.Object)); + classInfo.setSchemaType(new XSClass(SGTypes.OBJECT)); return new JClass[0]; } } else { @@ -383,10 +381,10 @@ FieldInfo fInfo = null; if (createForSingleGroup) { //By default a nested group Item can occur only once - fInfo = _infoFactory.createFieldInfo(new XSClass(jClass), fname); + fInfo = getInfoFactory().createFieldInfo(new XSClass(jClass), fname); } else { - fInfo = _infoFactory.createCollection( - new XSClass(jClass), "_items", fname, _config.useJava50()); + fInfo = getInfoFactory().createCollection( + new XSClass(jClass), "_items", fname, getConfig().useJava50()); } fInfo.setContainer(true); String newClassName = className.substring(0, className.length() - 4); @@ -391,8 +389,8 @@ fInfo.setContainer(true); String newClassName = className.substring(0, className.length() - 4); state = new FactoryState(newClassName, sgState, packageName); - classInfo = state._classInfo; - jClass = state._jClass; + classInfo = state.getClassInfo(); + jClass = state.getJClass(); initialize(jClass); if (type != null && type.isComplexType()) { ComplexType complexType = (ComplexType) type; @@ -402,8 +400,8 @@ processAttributes(component.getBinding(), complexType, state); component.setView(saved); if (complexType.getContentType() == ContentType.mixed) { - FieldInfo fieldInfo = memberFactory.createFieldInfoForContent( - new XSString(), _config.useJava50()); + FieldInfo fieldInfo = _memberFactory.createFieldInfoForContent( + new XSString(), getConfig().useJava50()); handleField(fieldInfo, state); } else if (complexType.getContentType().getType() == ContentType.SIMPLE) { SimpleContent simpleContent = (SimpleContent) complexType.getContentType(); @@ -409,9 +407,9 @@ SimpleContent simpleContent = (SimpleContent) complexType.getContentType(); SimpleType temp = simpleContent.getSimpleType(); XSType xsType = _typeConversion.convertType( - temp, packageName, _config.useJava50()); - FieldInfo fieldInfo = memberFactory.createFieldInfoForContent( - xsType, _config.useJava50()); + temp, packageName, getConfig().useJava50()); + FieldInfo fieldInfo = _memberFactory.createFieldInfoForContent( + xsType, getConfig().useJava50()); handleField(fieldInfo, state); temp = null; } else { @@ -423,7 +421,7 @@ classInfo.addFieldInfo(fInfo); fInfo.createJavaField(jClass); - fInfo.createAccessMethods(jClass, _config.useJava50()); + fInfo.createAccessMethods(jClass, getConfig().useJava50()); fInfo.generateInitializerCode(jClass.getConstructor(0).getSourceCode()); //-- name information @@ -594,8 +592,8 @@ private void processComplexType(final XMLBindingComponent component, final SGStateInfo sgState, final FactoryState state) { XMLType type = component.getXMLType(); - ClassInfo classInfo = state._classInfo; - JClass jClass = state._jClass; + ClassInfo classInfo = state.getClassInfo(); + JClass jClass = state.getJClass(); boolean creatingForAnElement = (component.getAnnotated().getStructureType() == Structure.ELEMENT); @@ -604,7 +602,8 @@ //--move the view and keep the structure Annotated saved = component.getAnnotated(); String previousPackage = component.getJavaPackage(); - XMLBindingComponent baseComponent = new XMLBindingComponent(_config, _groupNaming); + XMLBindingComponent baseComponent = new XMLBindingComponent( + getConfig(), getGroupNaming()); baseComponent.setBinding(component.getBinding()); baseComponent.setView(complexType); //-- call createSourceCode to pre-process the complexType @@ -714,7 +713,7 @@ typeName = JavaNaming.toJavaClassName( ((AttributeGroupDecl) attrDeclParent).getName() + typeName); } else { - typeName = fstate._jClass.getLocalName() + typeName; + typeName = fstate.getJClass().getLocalName() + typeName; } } //-- otherwise (???) just append "Type" @@ -725,7 +724,7 @@ //--XMLBindingComponent is only used to retrieve the java package //-- we need to optimize it by enabling the binding of simpleTypes. - XMLBindingComponent comp = new XMLBindingComponent(_config, _groupNaming); + XMLBindingComponent comp = new XMLBindingComponent(getConfig(), getGroupNaming()); if (binding != null) { comp.setBinding(binding); } @@ -733,7 +732,7 @@ String packageName = comp.getJavaPackage(); if ((packageName == null) || (packageName.length() == 0)) { - packageName = sgState._packageName; + packageName = sgState.getPackageName(); } if (simpleType.hasFacet(Facet.ENUMERATION)) { @@ -738,7 +737,8 @@ if (simpleType.hasFacet(Facet.ENUMERATION)) { enumeration = true; - //-- Fix packageName TODO: this is a hack I know, we should change this + // Fix packageName + // TODO this is a hack I know, we should change this if ((packageName != null) && (packageName.length() > 0)) { packageName = packageName + "." + SourceGeneratorConstants.TYPES_PACKAGE; } else { @@ -757,8 +757,8 @@ FactoryState state = new FactoryState(className, sgState, packageName); state.setParent(sgState.getCurrentFactoryState()); - ClassInfo classInfo = state._classInfo; - JClass jClass = state._jClass; + ClassInfo classInfo = state.getClassInfo(); + JClass jClass = state.getJClass(); initialize(jClass); @@ -805,7 +805,7 @@ private void initialize(final JClass jClass) { jClass.addInterface("java.io.Serializable"); - if (_config.useJava50()) { + if (getConfig().useJava50()) { JAnnotation serial = new JAnnotation(new JAnnotationType("SuppressWarnings")); serial.setValue(new String[] {"\"serial\""}); jClass.addAnnotation(serial); @@ -827,7 +827,7 @@ //-- add vector to hold listeners String vName = "propertyChangeSupport"; - JField field = new JField(SGTypes.PropertyChangeSupport, vName); + JField field = new JField(SGTypes.PROPERTY_CHANGE_SUPPORT, vName); field.getModifiers().makePrivate(); parent.addField(field); @@ -846,15 +846,15 @@ + "when a bound property's value changes."; jdc.appendComment(desc); - jMethod.addParameter(new JParameter(SGTypes.String, "fieldName")); + jMethod.addParameter(new JParameter(SGTypes.STRING, "fieldName")); jdDesc = jdc.getParamDescriptor("fieldName"); jdDesc.setDescription("the name of the property that has changed."); - jMethod.addParameter(new JParameter(SGTypes.Object, "oldValue")); + jMethod.addParameter(new JParameter(SGTypes.OBJECT, "oldValue")); jdDesc = jdc.getParamDescriptor("oldValue"); jdDesc.setDescription("the old value of the property."); - jMethod.addParameter(new JParameter(SGTypes.Object, "newValue")); + jMethod.addParameter(new JParameter(SGTypes.OBJECT, "newValue")); jdDesc = jdc.getParamDescriptor("newValue"); jdDesc.setDescription("the new value of the property."); @@ -941,11 +941,11 @@ private void createMarshalMethods(final JClass parent, final boolean isAbstract) { //-- create main marshal method JMethod jMethod = new JMethod("marshal"); - jMethod.addException(SGTypes.MarshalException, + jMethod.addException(SGTypes.MARSHAL_EXCEPTION, "if object is null or if any SAXException is thrown during marshaling"); - jMethod.addException(SGTypes.ValidationException, + jMethod.addException(SGTypes.VALIDATION_EXCEPTION, "if this object is an invalid instance according to the schema"); - jMethod.addParameter(new JParameter(SGTypes.Writer, "out")); + jMethod.addParameter(new JParameter(SGTypes.WRITER, "out")); //if (_config.useJava50()) { // jMethod.addAnnotation(new JAnnotation(new JAnnotationType("Override"))); @@ -969,11 +969,12 @@ jc = new JClass("org.xml.sax.DocumentHandler"); } else { jc = new JClass("org.xml.sax.ContentHandler"); - jMethod.addException(SGTypes.IOException, "if an IOException occurs during marshaling"); + jMethod.addException(SGTypes.IO_EXCEPTION, + "if an IOException occurs during marshaling"); } - jMethod.addException(SGTypes.MarshalException, + jMethod.addException(SGTypes.MARSHAL_EXCEPTION, "if object is null or if any SAXException is thrown during marshaling"); - jMethod.addException(SGTypes.ValidationException, + jMethod.addException(SGTypes.VALIDATION_EXCEPTION, "if this object is an invalid instance according to the schema"); jMethod.addParameter(new JParameter(jc, "handler")); parent.addMethod(jMethod); @@ -1004,11 +1005,11 @@ JMethod jMethod = new JMethod(methodName, returnType, "the unmarshaled " + returnType.getName()); jMethod.getModifiers().setStatic(true); - jMethod.addException(SGTypes.MarshalException, + jMethod.addException(SGTypes.MARSHAL_EXCEPTION, "if object is null or if any SAXException is thrown during marshaling"); - jMethod.addException(SGTypes.ValidationException, + jMethod.addException(SGTypes.VALIDATION_EXCEPTION, "if this object is an invalid instance according to the schema"); - jMethod.addParameter(new JParameter(SGTypes.Reader, "reader")); + jMethod.addParameter(new JParameter(SGTypes.READER, "reader")); parent.addMethod(jMethod); JSourceCode jsc = jMethod.getSourceCode(); @@ -1069,7 +1070,7 @@ } buffer.append(superClass.getName()); sgState.getDialog().notify(buffer.toString()); - // FIXME: We should probably throw an exception here + // FIXME We should probably throw an exception here break; } @@ -1158,9 +1159,9 @@ JField[] fields = jclass.getFields(); JMethod jMethod = new JMethod("equals", JType.BOOLEAN, "true if the objects are equal."); jMethod.setComment("Overrides the java.lang.Object.equals method."); - jMethod.addParameter(new JParameter(SGTypes.Object, "obj")); + jMethod.addParameter(new JParameter(SGTypes.OBJECT, "obj")); - if (_config.useJava50()) { + if (getConfig().useJava50()) { jMethod.addAnnotation(new JAnnotation(new JAnnotationType("Override"))); } @@ -1294,8 +1295,8 @@ JType type = temp.getType(); String name = temp.getName(); - if (state._fieldInfoForChoice != null - && name.equals(state._fieldInfoForChoice.getName())) { + if (state.getFieldInfoForChoice() != null + && name.equals(state.getFieldInfoForChoice().getName())) { continue; } @@ -1317,7 +1318,7 @@ String methodName = JavaNaming.toJavaClassName(tempName); methodName = "get" + methodName; JMethod method = jclass.getMethod(methodName, 0); - // TODO: handle the Item introduced in with the group handling + // TODO handle the Item introduced in with the group handling if (method == null) { continue; } @@ -1368,7 +1369,7 @@ * @param jclass The JClass which will implement the CastorTestable Interface. */ private void createDumpFields(final JClass jclass) { - JMethod jMethod = new JMethod("dumpFields", SGTypes.String, + JMethod jMethod = new JMethod("dumpFields", SGTypes.STRING, "a String representation of all of the fields for " + jclass.getName()); jMethod.setComment("implementation of org.exolab.castor.tests.framework.CastorTestable"); jclass.addMethod(jMethod); @@ -1441,7 +1442,7 @@ //-- #validate jMethod = new JMethod("validate"); - jMethod.addException(SGTypes.ValidationException, + jMethod.addException(SGTypes.VALIDATION_EXCEPTION, "if this object is an invalid instance according to the schema"); jClass.addMethod(jMethod); @@ -1531,7 +1532,7 @@ } Enumeration enumeration = complexType.getAttributeDecls(); - XMLBindingComponent component = new XMLBindingComponent(_config, _groupNaming); + XMLBindingComponent component = new XMLBindingComponent(getConfig(), getGroupNaming()); if (_binding != null) { component.setBinding(_binding); } @@ -1585,8 +1586,8 @@ } } - FieldInfo fieldInfo = memberFactory.createFieldInfo( - component, state, _config.useJava50()); + FieldInfo fieldInfo = _memberFactory.createFieldInfo( + component, state, getConfig().useJava50()); handleField(fieldInfo, state); } } @@ -1596,7 +1597,7 @@ * @param state the FactoryState. */ private void processComplexType(final ComplexType complexType, final FactoryState state) { - XMLBindingComponent component = new XMLBindingComponent(_config, _groupNaming); + XMLBindingComponent component = new XMLBindingComponent(getConfig(), getGroupNaming()); if (_binding != null) { component.setBinding(_binding); } @@ -1604,8 +1605,8 @@ String typeName = component.getXMLName(); - ClassInfo classInfo = state._classInfo; - classInfo.setSchemaType(new XSClass(state._jClass, typeName)); + ClassInfo classInfo = state.getClassInfo(); + classInfo.setSchemaType(new XSClass(state.getJClass(), typeName)); /// I don't believe this should be here: kv 20030423 ///classInfo.setNamespaceURI(component.getTargetNamespace()); @@ -1655,7 +1656,7 @@ find a more appropriate solution. if (! ( complexType.isRestricted() && ((ComplexType)base).isSimpleContent() ) ) */ - state._jClass.setSuperClass(baseClassName); + state.getJClass().setSuperClass(baseClassName); } //--complexType //--if the content type is a simpleType create a field info for it. @@ -1664,13 +1665,13 @@ SimpleType temp = simpleContent.getSimpleType(); SimpleType baseType = (SimpleType) temp.getBaseType(); XSType xsType = _typeConversion.convertType( - temp, state._packageName, _config.useJava50()); + temp, state.getPackageName(), getConfig().useJava50()); FieldInfo fieldInfo = null; - if ((baseType != null) && extendsSimpleType(state._jClass, baseType, state)) { + if ((baseType != null) && extendsSimpleType(state.getJClass(), baseType, state)) { if (xsType.isEnumerated()) { - fieldInfo = memberFactory.createFieldInfoForContent( - xsType, _config.useJava50()); + fieldInfo = _memberFactory.createFieldInfoForContent( + xsType, getConfig().useJava50()); fieldInfo.setBound(false); handleField(fieldInfo, state); @@ -1676,7 +1677,7 @@ //-- remove getter since we don't need to override the original getter String mname = fieldInfo.getReadMethodName(); - JClass jClass = state._jClass; + JClass jClass = state.getJClass(); JMethod method = jClass.getMethod(mname, 0); jClass.removeMethod(method); @@ -1697,9 +1698,9 @@ temp = (SimpleType) temp.getBaseType(); } xsType = _typeConversion.convertType( - temp, state._packageName, _config.useJava50()); - fieldInfo = memberFactory.createFieldInfoForContent( - xsType, _config.useJava50()); + temp, state.getPackageName(), getConfig().useJava50()); + fieldInfo = _memberFactory.createFieldInfoForContent( + xsType, getConfig().useJava50()); handleField(fieldInfo, state); } } @@ -1715,8 +1716,8 @@ //--reset the view on the current ComplexType component.setView(complexType); if (complexType.getContentType() == ContentType.mixed) { - FieldInfo fieldInfo = memberFactory.createFieldInfoForContent( - new XSString(), _config.useJava50()); + FieldInfo fieldInfo = _memberFactory.createFieldInfoForContent( + new XSString(), getConfig().useJava50()); handleField(fieldInfo, state); } } @@ -1741,14 +1742,15 @@ Enumeration enumeration = contentModel.enumerate(); //-- handle choice item - if (state._classInfo.isChoice() && state._fieldInfoForChoice == null) { - state._fieldInfoForChoice = memberFactory.createFieldInfoForChoiceValue(); - state._fieldInfoForChoice.createJavaField(state._jClass); - state._fieldInfoForChoice.createAccessMethods(state._jClass, _config.useJava50()); + if (state.getClassInfo().isChoice() && state.getFieldInfoForChoice() == null) { + state.setFieldInfoForChoice(_memberFactory.createFieldInfoForChoiceValue()); + state.getFieldInfoForChoice().createJavaField(state.getJClass()); + state.getFieldInfoForChoice().createAccessMethods( + state.getJClass(), getConfig().useJava50()); } FieldInfo fieldInfo = null; - XMLBindingComponent component = new XMLBindingComponent(_config, _groupNaming); + XMLBindingComponent component = new XMLBindingComponent(getConfig(), getGroupNaming()); if (_binding != null) { component.setBinding(_binding); } @@ -1759,8 +1761,8 @@ switch(annotated.getStructureType()) { case Structure.ELEMENT: //-- handle element declarations - fieldInfo = memberFactory.createFieldInfo( - component, state, _config.useJava50()); + fieldInfo = _memberFactory.createFieldInfo( + component, state, getConfig().useJava50()); //-- Fix for element declarations being used in //-- a group with minOccurs = 0; //-- (kvisco - 20021007) @@ -1775,11 +1777,11 @@ if ((contentModel instanceof ComplexType) || (contentModel instanceof ModelGroup)) { if (group.getOrder() == Order.choice) { - state._classInfo.getGroupInfo().setAsChoice(); + state.getClassInfo().getGroupInfo().setAsChoice(); } else if (group.getOrder() == Order.all) { - state._classInfo.getGroupInfo().setAsAll(); + state.getClassInfo().getGroupInfo().setAsAll(); } else if (group.getOrder() == Order.seq) { - state._classInfo.getGroupInfo().setAsSequence(); + state.getClassInfo().getGroupInfo().setAsSequence(); } } @@ -1794,9 +1796,8 @@ } if (contentModel.getParticleCount() > 0) { - fieldInfo = memberFactory.createFieldInfo(component, - state.getSGStateInfo(), - _config.useJava50()); + fieldInfo = _memberFactory.createFieldInfo( + component, state.getSGStateInfo(), getConfig().useJava50()); handleField(fieldInfo, state); } } else { @@ -1819,8 +1820,8 @@ } if (modelgroup.getParticleCount() > 0) { - fieldInfo = memberFactory.createFieldInfo( - component, state.getSGStateInfo(), _config.useJava50()); + fieldInfo = _memberFactory.createFieldInfo( + component, state.getSGStateInfo(), getConfig().useJava50()); handleField(fieldInfo, state); } break; @@ -1831,8 +1832,8 @@ case Structure.WILDCARD: Wildcard wildcard = (Wildcard) annotated; - FieldInfo fieldForAny = memberFactory.createFieldInfoForAny( - wildcard, _config.useJava50()); + FieldInfo fieldForAny = _memberFactory.createFieldInfoForAny( + wildcard, getConfig().useJava50()); handleField(fieldForAny, state); break; @@ -1856,12 +1857,12 @@ private void processEnumeration(final ExtendedBinding binding, final SimpleType simpleType, final FactoryState state) { // Added by robertlaferla at comcast dot net 01/21/2004 - if (_config.useEnumeratedTypeInterface()) { - state._jClass.addImport(ENUM_ACCESS_INTERFACE); - state._jClass.addInterface(ENUM_ACCESS_INTERFACE); + if (getConfig().useEnumeratedTypeInterface()) { + state.getJClass().addImport(ENUM_ACCESS_INTERFACE); + state.getJClass().addInterface(ENUM_ACCESS_INTERFACE); } // end enumTypeInterface - switch (enumerationType) { + switch (_enumerationType) { case BASE_TYPE_ENUMERATION: processEnumerationAsBaseType(binding, simpleType, state); break; @@ -1930,9 +1931,9 @@ } } - JSourceCode scInitializer = state._jClass.getConstructor(0).getSourceCode(); + JSourceCode scInitializer = state.getJClass().getConstructor(0).getSourceCode(); - ClassInfo base = state._classInfo.getBaseClass(); + ClassInfo base = state.getClassInfo().getBaseClass(); boolean present = false; if (base != null) { switch (fieldInfo.getNodeType()) { @@ -1951,7 +1952,7 @@ } } - state._classInfo.addFieldInfo(fieldInfo); + state.getClassInfo().addFieldInfo(fieldInfo); present = present && !fieldInfo.isMultivalued(); //create the relevant Java fields only if the field //info is not yet in the base classInfo or if it is not a collection @@ -1956,16 +1957,16 @@ //create the relevant Java fields only if the field //info is not yet in the base classInfo or if it is not a collection if (!present) { - if (state._fieldInfoForChoice != null) { - if (fieldInfo != state._fieldInfoForChoice) { - fieldInfo.setFieldInfoReference(state._fieldInfoForChoice); + if (state.getFieldInfoForChoice() != null) { + if (fieldInfo != state.getFieldInfoForChoice()) { + fieldInfo.setFieldInfoReference(state.getFieldInfoForChoice()); } } - fieldInfo.createJavaField(state._jClass); + fieldInfo.createJavaField(state.getJClass()); //-- do not create access methods for transient fields if (!fieldInfo.isTransient()) { - fieldInfo.createAccessMethods(state._jClass, _config.useJava50()); + fieldInfo.createAccessMethods(state.getJClass(), getConfig().useJava50()); if (fieldInfo.isBound()) { state.setBoundProperties(true); } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SourceGenerator.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SourceGenerator.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SourceGenerator.java (working copy) @@ -486,7 +486,8 @@ * @param packageName the package for the generated source files * @throws IOException if an IOException occurs writing the new source files */ - public final void generateSource(final String filename, final String packageName) throws IOException { + public final void generateSource( + final String filename, final String packageName) throws IOException { final File schemaFile; if (filename.startsWith("./")) { schemaFile = new File(filename.substring(2)); @@ -518,7 +519,8 @@ * @param packageName the package for the generated source files * @throws IOException if an IOException occurs writing the new source files */ - public final void generateSource(final Reader reader, final String packageName) throws IOException { + public final void generateSource( + final Reader reader, final String packageName) throws IOException { InputSource source = new InputSource(reader); generateSource(source, packageName); } //-- generateSource @@ -609,7 +611,8 @@ * @see #generateSource(InputSource, String) to provide an InputSource for * the schema */ - public final void generateSource(final Schema schema, final String packageName) throws IOException { + public final void generateSource( + final Schema schema, final String packageName) throws IOException { if (schema == null) { throw new IllegalArgumentException("The argument 'schema' must not be null."); } @@ -636,7 +639,7 @@ //-- create a new Source Generation State object for this invocation SGStateInfo sInfo = new SGStateInfo(schema, this); - sInfo._packageName = packageName; + sInfo.setPackageName(packageName); sInfo.setDialog(_dialog); sInfo.setVerbose(_verbose); sInfo.setSuppressNonFatalWarnings(_suppressNonFatalWarnings); @@ -670,7 +673,7 @@ * @param sInfo source generator state information * @throws IOException if this Exception occurs while processing an import schema */ - private final void generateAllClassFiles(final Schema schema, final SGStateInfo sInfo) + private void generateAllClassFiles(final Schema schema, final SGStateInfo sInfo) throws IOException { // Before processing the current schema, process its imported schemas if (!_suppressNonFatalWarnings || _generateImported) { @@ -720,7 +723,7 @@ * @param sInfo source generator state information * @throws IOException if this Exception occurs while processing an import schema */ - private final void processImportedSchemas(final Schema schema, final SGStateInfo sInfo) + private void processImportedSchemas(final Schema schema, final SGStateInfo sInfo) throws IOException { Enumeration enumeration = schema.getImportedSchema(); while (enumeration.hasMoreElements()) { @@ -733,7 +736,7 @@ _schemasProcessed.add(schema); if (!_schemasProcessed.contains(importedSchema)) { SGStateInfo importedSInfo = new SGStateInfo(importedSchema, this); - importedSInfo._packageName = sInfo._packageName; + importedSInfo.setPackageName(sInfo.getPackageName()); generateAllClassFiles(importedSchema, importedSInfo); //--'store' the imported JClass instances @@ -751,7 +754,7 @@ * @param sInfo Source Generator current state * @throws IOException if this Exception occurs while generating the mapping file */ - private final void generateMappingFile(final String packageName, final SGStateInfo sInfo) + private void generateMappingFile(final String packageName, final SGStateInfo sInfo) throws IOException { String pkg = (packageName != null) ? packageName : ""; MappingRoot mapping = sInfo.getMapping(pkg); @@ -780,7 +783,7 @@ * @param sInfo our state information * @throws IOException if this exception occurs while writing source files */ - private final void createClasses(final ElementDecl elementDecl, final SGStateInfo sInfo) + private void createClasses(final ElementDecl elementDecl, final SGStateInfo sInfo) throws IOException { if (sInfo.getStatusCode() == SGStateInfo.STOP_STATUS || elementDecl == null) { return; @@ -843,7 +846,7 @@ * @param sInfo our state information * @throws IOException if this exception occurs while writing source files */ - private final void createClasses(final Group group, final SGStateInfo sInfo) + private void createClasses(final Group group, final SGStateInfo sInfo) throws IOException { if (group == null) { return; @@ -879,7 +882,7 @@ * @param sInfo our state information * @throws IOException if this exception occurs while writing source files */ - private final void processComplexType(final ComplexType complexType, final SGStateInfo sInfo) + private void processComplexType(final ComplexType complexType, final SGStateInfo sInfo) throws IOException { if (sInfo.getStatusCode() == SGStateInfo.STOP_STATUS || complexType == null) { return; @@ -929,7 +932,7 @@ * @throws IOException if this Exception occurs while generating source * files */ - private final void processAttributes(final ComplexType complexType, final SGStateInfo sInfo) + private void processAttributes(final ComplexType complexType, final SGStateInfo sInfo) throws IOException { if (sInfo.getStatusCode() == SGStateInfo.STOP_STATUS || complexType == null) { return; @@ -949,7 +952,7 @@ * @param sInfo the current source generator state information * @throws IOException if this Exception occurs while generating source files */ - private final void processContentModel(final ContentModelGroup cmGroup, final SGStateInfo sInfo) + private void processContentModel(final ContentModelGroup cmGroup, final SGStateInfo sInfo) throws IOException { if (sInfo.getStatusCode() == SGStateInfo.STOP_STATUS || cmGroup == null) { return; @@ -990,7 +993,7 @@ * @param sInfo the current source generator state information * @throws IOException if this Exception occurs while generating source files */ - private final void processSimpleType(final SimpleType simpleType, final SGStateInfo sInfo) + private void processSimpleType(final SimpleType simpleType, final SGStateInfo sInfo) throws IOException { if (sInfo.getStatusCode() == SGStateInfo.STOP_STATUS || simpleType == null || simpleType.getSchema() != sInfo.getSchema()) { @@ -1019,7 +1022,7 @@ * @param packages * the array of package element */ - private final void processNamespaces(final PackageType[] packages) { + private void processNamespaces(final PackageType[] packages) { if (packages.length == 0) { return; } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SourceGeneratorConstants.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SourceGeneratorConstants.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/SourceGeneratorConstants.java (working copy) @@ -23,11 +23,10 @@ * @version $Revision: 0000 $ $Date: $ */ public interface SourceGeneratorConstants { - /** Enumerations are placed into this special package relative to the generated source. */ String TYPES_PACKAGE = "types"; - // FIXME: Use these strings in places like org.exolab.castor.builder.types.XSListJ2 + // FIXME Use these strings in places like org.exolab.castor.builder.types.XSListJ2 String FIELD_INFO_VECTOR = "vector"; String FIELD_INFO_ARRAY_LIST = "arraylist"; String FIELD_INFO_ODMG = "odmg"; @@ -34,5 +33,4 @@ String FIELD_INFO_COLLECTION = "collection"; String FIELD_INFO_SET = "set"; String FIELD_INFO_SORTED_SET = "sortedset"; - } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/TypeConversion.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/TypeConversion.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/TypeConversion.java (working copy) @@ -177,7 +177,7 @@ if (simpleType.getStructureType() == Structure.UNION) { SimpleType common = findCommonType((Union) simpleType); if (common == null) { - return new XSClass(SGTypes.Object); + return new XSClass(SGTypes.OBJECT); } return convertType(common, useWrapper, packageName, useJava50); } else if (base == null) { @@ -563,9 +563,9 @@ } if (isNumeric(aType) && isNumeric(bType)) { - //-- TODO: Finish this so we can implement Unions + // TODO Finish this so we can implement Unions } else if (isString(aType) && isString(bType)) { - //-- TODO: Finish this so we can implement Unions + // TODO Finish this so we can implement Unions } //-- Just return string for now, as all simpleTypes can fit into a string Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/XMLFieldHandlerFactory.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/XMLFieldHandlerFactory.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/XMLFieldHandlerFactory.java (working copy) @@ -22,9 +22,7 @@ import org.exolab.castor.builder.types.XSList; import org.exolab.castor.builder.types.XSType; import org.exolab.castor.xml.JavaNaming; -import org.exolab.javasource.JArrayType; import org.exolab.javasource.JClass; -import org.exolab.javasource.JPrimitiveType; import org.exolab.javasource.JSourceCode; /** Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/BindingDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/BindingDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/BindingDescriptor.java (working copy) @@ -23,7 +23,7 @@ /** * Field elementDefinition. */ - private boolean elementDefinition; + private boolean _elementDefinition; /** * Field nsPrefix. @@ -28,7 +28,7 @@ /** * Field nsPrefix. */ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; /** * Field nsURI. @@ -33,7 +33,7 @@ /** * Field nsURI. */ - private java.lang.String nsURI; + private java.lang.String _nsURI; /** * Field xmlName. @@ -38,7 +38,7 @@ /** * Field xmlName. */ - private java.lang.String xmlName; + private java.lang.String _xmlName; /** * Field identity. @@ -43,7 +43,7 @@ /** * Field identity. */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -52,9 +52,9 @@ public BindingDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "binding"; - elementDefinition = true; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "binding"; + _elementDefinition = true; //-- set grouping compositor setCompositorAsSequence(); @@ -97,8 +97,6 @@ //-- validation code for: _defaultBindingType fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } desc.setValidator(fieldValidator); //-- initialize element descriptors @@ -142,8 +140,6 @@ //-- validation code for: _includeList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _packageList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -185,8 +181,6 @@ //-- validation code for: _packageList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _namingXML desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -218,8 +212,6 @@ //-- validation code for: _namingXML fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _elementBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -262,8 +254,6 @@ //-- validation code for: _elementBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _attributeBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -307,8 +297,6 @@ //-- validation code for: _attributeBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _complexTypeBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -352,8 +340,6 @@ //-- validation code for: _complexTypeBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _groupBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -396,8 +382,6 @@ //-- validation code for: _groupBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _enumBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -440,8 +424,6 @@ //-- validation code for: _enumBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _simpleTypeBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -485,8 +467,6 @@ //-- validation code for: _simpleTypeBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); } //-- org.exolab.castor.builder.binding.BindingDescriptor() @@ -521,7 +501,7 @@ * identity. */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -539,7 +519,7 @@ * @return the namespace prefix to use when marshalling as XML. */ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -549,7 +529,7 @@ * unmarshalling as XML. */ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -568,7 +548,7 @@ * @return the XML Name for the Class being described. */ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() /** @@ -579,7 +559,7 @@ * element or element with anonymous type definition. */ public boolean isElementDefinition() { - return elementDefinition; + return _elementDefinition; } //-- boolean isElementDefinition() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/BindingLoader.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/BindingLoader.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/BindingLoader.java (working copy) @@ -45,21 +45,18 @@ package org.exolab.castor.builder.binding; //-Castor imports -import org.exolab.castor.xml.Unmarshaller; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Enumeration; + import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Unmarshaller; import org.exolab.castor.xml.ValidationException; - -//--SAX +import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; -import org.xml.sax.EntityResolver; import org.xml.sax.SAXException; -//--java imports -import java.io.IOException; -import java.util.Enumeration; -import java.net.URL; -import java.net.MalformedURLException; - /** * This class is responsible for loading a binding document into an in-memory * representation that is meant to be used by the SourceGenerator. @@ -64,8 +61,6 @@ * This class is responsible for loading a binding document into an in-memory * representation that is meant to be used by the SourceGenerator. * - * TODO: Implement the enumeration handling - * * @author Arnaud Blandin * @version $Revision$ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $ */ @@ -70,6 +65,7 @@ * @version $Revision$ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $ */ public final class BindingLoader { + // TODO Implement the enumeration handling /** * The Source Generator Binding File loaded by this BindingLoader. Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ClassType.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ClassType.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ClassType.java (working copy) @@ -12,7 +12,9 @@ //---------------------------------/ import java.util.Vector; -import org.exolab.castor.xml.*; + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; /** * @@ -46,7 +48,7 @@ /** * keeps track of state for field: _final. **/ - private boolean _has_final; + private boolean _hasFinal; private boolean _abstract; @@ -53,7 +55,7 @@ /** * keeps track of state for field: _abstract. **/ - private boolean _has_abstract; + private boolean _hasAbstract; private boolean _equals; @@ -60,7 +62,7 @@ /** * keeps track of state for field: _equals. **/ - private boolean _has_equals; + private boolean _hasEquals; private boolean _bound; @@ -67,7 +69,7 @@ /** * keeps track of state for field: _bound. **/ - private boolean _has_bound; + private boolean _hasBound; private java.util.Vector _implementsList; @@ -112,7 +114,7 @@ /** **/ public void deleteAbstract() { - this._has_abstract = false; + this._hasAbstract = false; } //-- void deleteAbstract() /** @@ -118,7 +120,7 @@ /** **/ public void deleteBound() { - this._has_bound = false; + this._hasBound = false; } //-- void deleteBound() /** @@ -124,7 +126,7 @@ /** **/ public void deleteEquals() { - this._has_equals = false; + this._hasEquals = false; } //-- void deleteEquals() /** @@ -130,7 +132,7 @@ /** **/ public void deleteFinal() { - this._has_final = false; + this._hasFinal = false; } //-- void deleteFinal() /** @@ -237,7 +239,7 @@ /** **/ public boolean hasAbstract() { - return this._has_abstract; + return this._hasAbstract; } //-- boolean hasAbstract() /** @@ -243,7 +245,7 @@ /** **/ public boolean hasBound() { - return this._has_bound; + return this._hasBound; } //-- boolean hasBound() /** @@ -249,7 +251,7 @@ /** **/ public boolean hasEquals() { - return this._has_equals; + return this._hasEquals; } //-- boolean hasEquals() /** @@ -255,7 +257,7 @@ /** **/ public boolean hasFinal() { - return this._has_final; + return this._hasFinal; } //-- boolean hasFinal() /** @@ -312,11 +314,11 @@ /** * Sets the value of field 'abstract'. * - * @param _abstract the value of field 'abstract'. + * @param abst the value of field 'abstract'. **/ - public void setAbstract(final boolean _abstract) { - this._abstract = _abstract; - this._has_abstract = true; + public void setAbstract(final boolean abst) { + this._abstract = abst; + this._hasAbstract = true; } //-- void setAbstract(boolean) /** @@ -326,7 +328,7 @@ **/ public void setBound(final boolean bound) { this._bound = bound; - this._has_bound = true; + this._hasBound = true; } //-- void setBound(boolean) /** @@ -336,7 +338,7 @@ **/ public void setEquals(final boolean equals) { this._equals = equals; - this._has_equals = true; + this._hasEquals = true; } //-- void setEquals(boolean) /** @@ -342,10 +344,10 @@ /** * Sets the value of field 'extends'. * - * @param _extends the value of field 'extends'. + * @param ext the value of field 'extends'. **/ - public void setExtends(final java.lang.String _extends) { - this._extends = _extends; + public void setExtends(final java.lang.String ext) { + this._extends = ext; } //-- void setExtends(java.lang.String) /** @@ -351,11 +353,11 @@ /** * Sets the value of field 'final'. * - * @param _final the value of field 'final'. + * @param fin the value of field 'final'. **/ - public void setFinal(final boolean _final) { - this._final = _final; - this._has_final = true; + public void setFinal(final boolean fin) { + this._final = fin; + this._hasFinal = true; } //-- void setFinal(boolean) /** @@ -376,13 +378,13 @@ /** * * - * @param _implementsArray + * @param implementsArray **/ - public void setImplements(final java.lang.String[] _implementsArray) { + public void setImplements(final java.lang.String[] implementsArray) { //-- copy array _implementsList.removeAllElements(); - for (int i = 0; i < _implementsArray.length; i++) { - _implementsList.addElement(_implementsArray[i]); + for (int i = 0; i < implementsArray.length; i++) { + _implementsList.addElement(implementsArray[i]); } } //-- void setImplements(java.lang.String) @@ -398,10 +400,10 @@ /** * Sets the value of field 'package'. * - * @param _package the value of field 'package'. + * @param pack the value of field 'package'. **/ - public void setPackage(final java.lang.String _package) { - this._package = _package; + public void setPackage(final java.lang.String pack) { + this._package = pack; } //-- void setPackage(java.lang.String) /** Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ClassTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ClassTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ClassTypeDescriptor.java (working copy) @@ -11,10 +11,12 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; import org.exolab.castor.xml.FieldValidator; +import org.exolab.castor.xml.NodeType; +import org.exolab.castor.xml.XMLFieldHandler; import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; -import org.exolab.castor.xml.validators.*; +import org.exolab.castor.xml.validators.BooleanValidator; +import org.exolab.castor.xml.validators.StringValidator; /** * @@ -29,13 +31,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -44,8 +46,8 @@ public ClassTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "classType"; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "classType"; //-- set grouping compositor setCompositorAsSequence(); @@ -82,11 +84,9 @@ //-- validation code for: _package fieldValidator = new FieldValidator(); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv1 = new StringValidator(); + sv1.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv1); desc.setValidator(fieldValidator); //-- _name @@ -117,11 +117,9 @@ //-- validation code for: _name fieldValidator = new FieldValidator(); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv2 = new StringValidator(); + sv2.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv2); desc.setValidator(fieldValidator); //-- _final @@ -157,10 +155,8 @@ //-- validation code for: _final fieldValidator = new FieldValidator(); - { //-- local scope - BooleanValidator bv = new BooleanValidator(); - fieldValidator.setValidator(bv); - } + BooleanValidator bv1 = new BooleanValidator(); + fieldValidator.setValidator(bv1); desc.setValidator(fieldValidator); //-- _abstract @@ -196,10 +192,8 @@ //-- validation code for: _abstract fieldValidator = new FieldValidator(); - { //-- local scope - BooleanValidator bv = new BooleanValidator(); - fieldValidator.setValidator(bv); - } + BooleanValidator bv2 = new BooleanValidator(); + fieldValidator.setValidator(bv2); desc.setValidator(fieldValidator); //-- _equals @@ -235,10 +229,8 @@ //-- validation code for: _equals fieldValidator = new FieldValidator(); - { //-- local scope - BooleanValidator bv = new BooleanValidator(); - fieldValidator.setValidator(bv); - } + BooleanValidator bv3 = new BooleanValidator(); + fieldValidator.setValidator(bv3); desc.setValidator(fieldValidator); //-- _bound @@ -274,10 +266,8 @@ //-- validation code for: _bound fieldValidator = new FieldValidator(); - { //-- local scope - BooleanValidator bv = new BooleanValidator(); - fieldValidator.setValidator(bv); - } + BooleanValidator bv4 = new BooleanValidator(); + fieldValidator.setValidator(bv4); desc.setValidator(fieldValidator); //-- initialize element descriptors @@ -313,11 +303,9 @@ //-- validation code for: _implementsList fieldValidator = new FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv3 = new StringValidator(); + sv3.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv3); desc.setValidator(fieldValidator); //-- _extends @@ -350,11 +338,9 @@ //-- validation code for: _extends fieldValidator = new FieldValidator(); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv4 = new StringValidator(); + sv4.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv4); desc.setValidator(fieldValidator); } //-- org.exolab.castor.builder.binding.ClassTypeDescriptor() @@ -379,7 +365,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -391,7 +377,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -397,7 +383,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -409,7 +395,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ComponentBindingTypeChoice.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ComponentBindingTypeChoice.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ComponentBindingTypeChoice.java (working copy) @@ -155,11 +155,10 @@ /** * Sets the value of field 'interface'. * - * @param _interface - * @param interface the value of field 'interface'. + * @param inter the value of field 'interface'. */ - public void setInterface(final org.exolab.castor.builder.binding.Interface _interface) { - this._interface = _interface; + public void setInterface(final org.exolab.castor.builder.binding.Interface inter) { + this._interface = inter; } //-- void setInterface(org.exolab.castor.builder.binding.Interface) /** Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ComponentBindingTypeChoiceDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ComponentBindingTypeChoiceDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ComponentBindingTypeChoiceDescriptor.java (working copy) @@ -23,7 +23,7 @@ /** * Field elementDefinition. */ - private boolean elementDefinition; + private boolean _elementDefinition; /** * Field nsPrefix. @@ -28,7 +28,7 @@ /** * Field nsPrefix. */ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; /** * Field nsURI. @@ -33,7 +33,7 @@ /** * Field nsURI. */ - private java.lang.String nsURI; + private java.lang.String _nsURI; /** * Field xmlName. @@ -38,7 +38,7 @@ /** * Field xmlName. */ - private java.lang.String xmlName; + private java.lang.String _xmlName; /** * Field identity. @@ -43,7 +43,7 @@ /** * Field identity. */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -52,8 +52,8 @@ public ComponentBindingTypeChoiceDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - elementDefinition = false; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _elementDefinition = false; //-- set grouping compositor setCompositorAsChoice(); @@ -96,8 +96,6 @@ //-- validation code for: _javaClass fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _interface desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -131,8 +129,6 @@ //-- validation code for: _interface fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _member desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -166,8 +162,6 @@ //-- validation code for: _member fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _enumDef desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -201,8 +195,6 @@ //-- validation code for: _enumDef fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - } desc.setValidator(fieldValidator); } //-- org.exolab.castor.builder.binding.ComponentBindingTypeChoiceDescriptor() @@ -237,7 +229,7 @@ * identity. */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -255,7 +247,7 @@ * @return the namespace prefix to use when marshalling as XML. */ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -265,7 +257,7 @@ * unmarshalling as XML. */ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -284,7 +276,7 @@ * @return the XML Name for the Class being described. */ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() /** @@ -295,7 +287,7 @@ * element or element with anonymous type definition. */ public boolean isElementDefinition() { - return elementDefinition; + return _elementDefinition; } //-- boolean isElementDefinition() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ComponentBindingTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ComponentBindingTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ComponentBindingTypeDescriptor.java (working copy) @@ -23,7 +23,7 @@ /** * Field elementDefinition. */ - private boolean elementDefinition; + private boolean _elementDefinition; /** * Field nsPrefix. @@ -28,7 +28,7 @@ /** * Field nsPrefix. */ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; /** * Field nsURI. @@ -33,7 +33,7 @@ /** * Field nsURI. */ - private java.lang.String nsURI; + private java.lang.String _nsURI; /** * Field xmlName. @@ -38,7 +38,7 @@ /** * Field xmlName. */ - private java.lang.String xmlName; + private java.lang.String _xmlName; /** * Field identity. @@ -43,7 +43,7 @@ /** * Field identity. */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -52,9 +52,9 @@ public ComponentBindingTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "componentBindingType"; - elementDefinition = false; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "componentBindingType"; + _elementDefinition = false; //-- set grouping compositor setCompositorAsSequence(); @@ -94,12 +94,10 @@ //-- validation code for: _name fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator = - new org.exolab.castor.xml.validators.StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.StringValidator typeValidator1 = + new org.exolab.castor.xml.validators.StringValidator(); + typeValidator1.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator1); desc.setValidator(fieldValidator); //-- initialize element descriptors @@ -140,8 +138,6 @@ //-- validation code for: _componentBindingTypeChoice fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _elementBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -184,8 +180,6 @@ //-- validation code for: _elementBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _attributeBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -229,8 +223,6 @@ //-- validation code for: _attributeBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _complexTypeBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -274,8 +266,6 @@ //-- validation code for: _complexTypeBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _groupBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -318,8 +308,6 @@ //-- validation code for: _groupBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _enumBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -362,8 +350,6 @@ //-- validation code for: _enumBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _simpleTypeBindingList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -407,8 +393,6 @@ //-- validation code for: _simpleTypeBindingList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); } //-- org.exolab.castor.builder.binding.ComponentBindingTypeDescriptor() @@ -443,7 +427,7 @@ * identity. */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -461,7 +445,7 @@ * @return the namespace prefix to use when marshalling as XML. */ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -471,7 +455,7 @@ * unmarshalling as XML. */ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -490,7 +474,7 @@ * @return the XML Name for the Class being described. */ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() /** @@ -501,7 +485,7 @@ * element or element with anonymous type definition. */ public boolean isElementDefinition() { - return elementDefinition; + return _elementDefinition; } //-- boolean isElementDefinition() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumBindingTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumBindingTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumBindingTypeDescriptor.java (working copy) @@ -23,7 +23,7 @@ /** * Field elementDefinition. */ - private boolean elementDefinition; + private boolean _elementDefinition; /** * Field nsPrefix. @@ -28,7 +28,7 @@ /** * Field nsPrefix. */ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; /** * Field nsURI. @@ -33,7 +33,7 @@ /** * Field nsURI. */ - private java.lang.String nsURI; + private java.lang.String _nsURI; /** * Field xmlName. @@ -38,7 +38,7 @@ /** * Field xmlName. */ - private java.lang.String xmlName; + private java.lang.String _xmlName; /** * Field identity. @@ -43,7 +43,7 @@ /** * Field identity. */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -52,9 +52,9 @@ public EnumBindingTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "enumBindingType"; - elementDefinition = false; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "enumBindingType"; + _elementDefinition = false; //-- set grouping compositor setCompositorAsSequence(); @@ -96,8 +96,6 @@ //-- validation code for: _enumClassName fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _enumMemberList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -139,8 +137,6 @@ //-- validation code for: _enumMemberList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); - { //-- local scope - } desc.setValidator(fieldValidator); } //-- org.exolab.castor.builder.binding.EnumBindingTypeDescriptor() @@ -175,7 +171,7 @@ * identity. */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -193,7 +189,7 @@ * @return the namespace prefix to use when marshalling as XML. */ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -203,7 +199,7 @@ * unmarshalling as XML. */ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -222,7 +218,7 @@ * @return the XML Name for the Class being described. */ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() /** @@ -233,7 +229,7 @@ * element or element with anonymous type definition. */ public boolean isElementDefinition() { - return elementDefinition; + return _elementDefinition; } //-- boolean isElementDefinition() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumClassName.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumClassName.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumClassName.java (working copy) @@ -128,12 +128,11 @@ /** * Sets the value of field 'package'. * - * @param _package - * @param package the value of field 'package'. + * @param pack the value of field 'package'. */ - public void setPackage(final java.lang.String _package) { - this._package = _package; - } //-- void setPackage(java.lang.String) + public void setPackage(final java.lang.String pack) { + this._package = pack; + } /** * Method unmarshalEnumClassName. Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumClassNameDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumClassNameDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumClassNameDescriptor.java (working copy) @@ -23,7 +23,7 @@ /** * Field elementDefinition. */ - private boolean elementDefinition; + private boolean _elementDefinition; /** * Field nsPrefix. @@ -28,7 +28,7 @@ /** * Field nsPrefix. */ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; /** * Field nsURI. @@ -33,7 +33,7 @@ /** * Field nsURI. */ - private java.lang.String nsURI; + private java.lang.String _nsURI; /** * Field xmlName. @@ -38,7 +38,7 @@ /** * Field xmlName. */ - private java.lang.String xmlName; + private java.lang.String _xmlName; /** * Field identity. @@ -43,7 +43,7 @@ /** * Field identity. */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -52,9 +52,9 @@ public EnumClassNameDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "enumClassName"; - elementDefinition = true; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "enumClassName"; + _elementDefinition = true; org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; org.exolab.castor.mapping.FieldHandler handler = null; org.exolab.castor.xml.FieldValidator fieldValidator = null; @@ -87,12 +87,10 @@ //-- validation code for: _content fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator = - new org.exolab.castor.xml.validators.StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.StringValidator typeValidator1 = + new org.exolab.castor.xml.validators.StringValidator(); + typeValidator1.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator1); desc.setValidator(fieldValidator); //-- initialize attribute descriptors @@ -126,12 +124,10 @@ //-- validation code for: _package fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator = - new org.exolab.castor.xml.validators.StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.StringValidator typeValidator2 = + new org.exolab.castor.xml.validators.StringValidator(); + typeValidator2.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator2); desc.setValidator(fieldValidator); //-- initialize element descriptors @@ -168,7 +164,7 @@ * identity. */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -186,7 +182,7 @@ * @return the namespace prefix to use when marshalling as XML. */ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -196,7 +192,7 @@ * unmarshalling as XML. */ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -215,7 +211,7 @@ * @return the XML Name for the Class being described. */ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() /** @@ -226,7 +222,7 @@ * element or element with anonymous type definition. */ public boolean isElementDefinition() { - return elementDefinition; + return _elementDefinition; } //-- boolean isElementDefinition() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumMemberDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumMemberDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/EnumMemberDescriptor.java (working copy) @@ -23,7 +23,7 @@ /** * Field elementDefinition. */ - private boolean elementDefinition; + private boolean _elementDefinition; /** * Field nsPrefix. @@ -28,7 +28,7 @@ /** * Field nsPrefix. */ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; /** * Field nsURI. @@ -33,7 +33,7 @@ /** * Field nsURI. */ - private java.lang.String nsURI; + private java.lang.String _nsURI; /** * Field xmlName. @@ -38,7 +38,7 @@ /** * Field xmlName. */ - private java.lang.String xmlName; + private java.lang.String _xmlName; /** * Field identity. @@ -43,7 +43,7 @@ /** * Field identity. */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -52,9 +52,9 @@ public EnumMemberDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "enumMember"; - elementDefinition = true; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "enumMember"; + _elementDefinition = true; //-- set grouping compositor setCompositorAsSequence(); @@ -98,12 +98,10 @@ //-- validation code for: _value fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator = - new org.exolab.castor.xml.validators.StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.StringValidator typeValidator1 = + new org.exolab.castor.xml.validators.StringValidator(); + typeValidator1.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator1); desc.setValidator(fieldValidator); //-- _javaName desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -138,12 +136,10 @@ //-- validation code for: _javaName fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator = - new org.exolab.castor.xml.validators.StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.StringValidator typeValidator2 = + new org.exolab.castor.xml.validators.StringValidator(); + typeValidator2.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator2); desc.setValidator(fieldValidator); } //-- org.exolab.castor.builder.binding.EnumMemberDescriptor() @@ -178,7 +174,7 @@ * identity. */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -196,7 +192,7 @@ * @return the namespace prefix to use when marshalling as XML. */ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -206,7 +202,7 @@ * unmarshalling as XML. */ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -225,7 +221,7 @@ * @return the XML Name for the Class being described. */ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() /** @@ -236,7 +232,7 @@ * element or element with anonymous type definition. */ public boolean isElementDefinition() { - return elementDefinition; + return _elementDefinition; } //-- boolean isElementDefinition() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ExtendedBinding.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ExtendedBinding.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/ExtendedBinding.java (working copy) @@ -45,6 +45,8 @@ package org.exolab.castor.builder.binding; //--Castor imports +import java.util.Hashtable; + import org.exolab.castor.xml.schema.Annotated; import org.exolab.castor.xml.schema.AttributeDecl; import org.exolab.castor.xml.schema.ComplexType; @@ -54,8 +56,6 @@ import org.exolab.castor.xml.schema.SimpleType; import org.exolab.castor.xml.schema.Structure; -import java.util.Hashtable; - /** * This class adds the necessary logic to a Binding Object to bring the gap * between the XML Schema Object Model and the Binding File. It queries the Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/FieldType.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/FieldType.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/FieldType.java (working copy) @@ -52,7 +52,7 @@ /** * keeps track of state for field: _wrapper. */ - private boolean _has_wrapper; + private boolean _hasWrapper; /** * Field _handler. @@ -91,7 +91,7 @@ /** */ public void deleteWrapper() { - this._has_wrapper = false; + this._hasWrapper = false; } //-- void deleteWrapper() /** @@ -163,7 +163,7 @@ * @return true if at least one Wrapper has been added */ public boolean hasWrapper() { - return this._has_wrapper; + return this._hasWrapper; } //-- boolean hasWrapper() /** @@ -283,7 +283,7 @@ */ public void setWrapper(final boolean wrapper) { this._wrapper = wrapper; - this._has_wrapper = true; + this._hasWrapper = true; } //-- void setWrapper(boolean) /** Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/FieldTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/FieldTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/FieldTypeDescriptor.java (working copy) @@ -23,7 +23,7 @@ /** * Field elementDefinition. */ - private boolean elementDefinition; + private boolean _elementDefinition; /** * Field nsPrefix. @@ -28,7 +28,7 @@ /** * Field nsPrefix. */ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; /** * Field nsURI. @@ -33,7 +33,7 @@ /** * Field nsURI. */ - private java.lang.String nsURI; + private java.lang.String _nsURI; /** * Field xmlName. @@ -38,7 +38,7 @@ /** * Field xmlName. */ - private java.lang.String xmlName; + private java.lang.String _xmlName; /** * Field identity. @@ -43,7 +43,7 @@ /** * Field identity. */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -52,9 +52,9 @@ public FieldTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "fieldType"; - elementDefinition = false; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "fieldType"; + _elementDefinition = false; org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; org.exolab.castor.mapping.FieldHandler handler = null; org.exolab.castor.xml.FieldValidator fieldValidator = null; @@ -90,12 +90,10 @@ //-- validation code for: _name fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator = - new org.exolab.castor.xml.validators.StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.StringValidator typeValidator1 = + new org.exolab.castor.xml.validators.StringValidator(); + typeValidator1.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator1); desc.setValidator(fieldValidator); //-- _javaType desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -127,12 +125,10 @@ //-- validation code for: _javaType fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator = - new org.exolab.castor.xml.validators.StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.StringValidator typeValidator2 = + new org.exolab.castor.xml.validators.StringValidator(); + typeValidator2.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator2); desc.setValidator(fieldValidator); //-- _wrapper desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -169,11 +165,9 @@ //-- validation code for: _wrapper fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator = - new org.exolab.castor.xml.validators.BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.BooleanValidator typeValidator3 = + new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator3); desc.setValidator(fieldValidator); //-- _handler desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -205,12 +199,10 @@ //-- validation code for: _handler fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator = - new org.exolab.castor.xml.validators.StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.StringValidator typeValidator4 = + new org.exolab.castor.xml.validators.StringValidator(); + typeValidator4.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator4); desc.setValidator(fieldValidator); //-- _collection desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -246,8 +238,6 @@ //-- validation code for: _collection fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _visibility desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -283,8 +273,6 @@ //-- validation code for: _visibility fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } desc.setValidator(fieldValidator); //-- _validator desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( @@ -316,12 +304,10 @@ //-- validation code for: _validator fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator = - new org.exolab.castor.xml.validators.StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } + org.exolab.castor.xml.validators.StringValidator typeValidator5 = + new org.exolab.castor.xml.validators.StringValidator(); + typeValidator5.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator5); desc.setValidator(fieldValidator); //-- initialize element descriptors @@ -358,7 +344,7 @@ * identity. */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -376,7 +362,7 @@ * @return the namespace prefix to use when marshalling as XML. */ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -386,7 +372,7 @@ * unmarshalling as XML. */ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -405,7 +391,7 @@ * @return the XML Name for the Class being described. */ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() /** @@ -416,7 +402,7 @@ * element or element with anonymous type definition. */ public boolean isElementDefinition() { - return elementDefinition; + return _elementDefinition; } //-- boolean isElementDefinition() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/IncludeType.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/IncludeType.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/IncludeType.java (working copy) @@ -11,7 +11,8 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; /** * @@ -29,7 +30,7 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String _URI; + private java.lang.String _uri; //----------------/ @@ -51,7 +52,7 @@ * @return the value of field 'URI'. **/ public java.lang.String getURI() { - return this._URI; + return this._uri; } //-- java.lang.String getURI() /** @@ -89,10 +90,10 @@ /** * Sets the value of field 'URI'. * - * @param URI the value of field 'URI'. + * @param uri the value of field 'URI'. **/ - public void setURI(final java.lang.String URI) { - this._URI = URI; + public void setURI(final java.lang.String uri) { + this._uri = uri; } //-- void setURI(java.lang.String) /** Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/IncludeTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/IncludeTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/IncludeTypeDescriptor.java (working copy) @@ -11,8 +11,9 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; import org.exolab.castor.xml.FieldValidator; +import org.exolab.castor.xml.NodeType; +import org.exolab.castor.xml.XMLFieldHandler; import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; /** @@ -28,13 +29,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -43,8 +44,8 @@ public IncludeTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "includeType"; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "includeType"; XMLFieldDescriptorImpl desc = null; XMLFieldHandler handler = null; FieldValidator fieldValidator = null; @@ -105,7 +106,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -117,7 +118,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -123,7 +124,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -135,7 +136,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/Interface.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/Interface.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/Interface.java (working copy) @@ -11,7 +11,8 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; /** * Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/InterfaceDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/InterfaceDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/InterfaceDescriptor.java (working copy) @@ -11,10 +11,11 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; import org.exolab.castor.xml.FieldValidator; +import org.exolab.castor.xml.NodeType; +import org.exolab.castor.xml.XMLFieldHandler; import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; -import org.exolab.castor.xml.validators.*; +import org.exolab.castor.xml.validators.StringValidator; /** * @@ -29,13 +30,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -44,8 +45,8 @@ public InterfaceDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "interface"; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "interface"; XMLFieldDescriptorImpl desc = null; XMLFieldHandler handler = null; FieldValidator fieldValidator = null; @@ -81,11 +82,9 @@ //-- validation code for: _name fieldValidator = new FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv1 = new StringValidator(); + sv1.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv1); desc.setValidator(fieldValidator); //-- initialize element descriptors @@ -112,7 +111,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -124,7 +123,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -130,7 +129,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -142,7 +141,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingType.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingType.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingType.java (working copy) @@ -11,7 +11,8 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; /** * Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingTypeDescriptor.java (working copy) @@ -11,10 +11,11 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; import org.exolab.castor.xml.FieldValidator; +import org.exolab.castor.xml.NodeType; +import org.exolab.castor.xml.XMLFieldHandler; import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; -import org.exolab.castor.xml.validators.*; +import org.exolab.castor.xml.validators.StringValidator; /** * @@ -29,13 +30,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -44,8 +45,8 @@ public NamingTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "namingType"; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "namingType"; //-- set grouping compositor setCompositorAsSequence(); @@ -86,11 +87,9 @@ //-- validation code for: _prefix fieldValidator = new FieldValidator(); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv1 = new StringValidator(); + sv1.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv1); desc.setValidator(fieldValidator); //-- _suffix @@ -123,11 +122,9 @@ //-- validation code for: _suffix fieldValidator = new FieldValidator(); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv2 = new StringValidator(); + sv2.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv2); desc.setValidator(fieldValidator); } //-- org.exolab.castor.builder.binding.NamingTypeDescriptor() @@ -152,7 +149,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -164,7 +161,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -170,7 +167,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -182,7 +179,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingXMLType.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingXMLType.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingXMLType.java (working copy) @@ -11,7 +11,8 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; /** * Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingXMLTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingXMLTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/NamingXMLTypeDescriptor.java (working copy) @@ -11,8 +11,9 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; import org.exolab.castor.xml.FieldValidator; +import org.exolab.castor.xml.NodeType; +import org.exolab.castor.xml.XMLFieldHandler; import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; /** @@ -28,13 +29,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -43,8 +44,8 @@ public NamingXMLTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "namingXMLType"; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "namingXMLType"; //-- set grouping compositor setCompositorAsSequence(); @@ -170,7 +171,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -182,7 +183,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -188,7 +189,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -200,7 +201,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageType.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageType.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageType.java (working copy) @@ -11,7 +11,8 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; /** * Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageTypeChoice.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageTypeChoice.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageTypeChoice.java (working copy) @@ -11,7 +11,8 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; /** * Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageTypeChoiceDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageTypeChoiceDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageTypeChoiceDescriptor.java (working copy) @@ -11,10 +11,11 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; import org.exolab.castor.xml.FieldValidator; +import org.exolab.castor.xml.NodeType; +import org.exolab.castor.xml.XMLFieldHandler; import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; -import org.exolab.castor.xml.validators.*; +import org.exolab.castor.xml.validators.StringValidator; /** * @@ -29,13 +30,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -86,11 +87,9 @@ //-- validation code for: _namespace fieldValidator = new FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv1 = new StringValidator(); + sv1.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv1); desc.setValidator(fieldValidator); //-- _schemaLocation @@ -125,11 +124,9 @@ //-- validation code for: _schemaLocation fieldValidator = new FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv2 = new StringValidator(); + sv2.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv2); desc.setValidator(fieldValidator); } //-- org.exolab.castor.builder.binding.PackageTypeChoiceDescriptor() @@ -154,7 +151,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -166,7 +163,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -172,7 +169,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -184,7 +181,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PackageTypeDescriptor.java (working copy) @@ -11,10 +11,11 @@ //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; import org.exolab.castor.xml.FieldValidator; +import org.exolab.castor.xml.NodeType; +import org.exolab.castor.xml.XMLFieldHandler; import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; -import org.exolab.castor.xml.validators.*; +import org.exolab.castor.xml.validators.StringValidator; /** * @@ -29,13 +30,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -44,8 +45,8 @@ public PackageTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "packageType"; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "packageType"; //-- set grouping compositor setCompositorAsSequence(); @@ -88,11 +89,9 @@ //-- validation code for: _name fieldValidator = new FieldValidator(); fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator sv = new StringValidator(); - sv.setWhiteSpace("preserve"); - fieldValidator.setValidator(sv); - } + StringValidator sv1 = new StringValidator(); + sv1.setWhiteSpace("preserve"); + fieldValidator.setValidator(sv1); desc.setValidator(fieldValidator); //-- _packageTypeChoice @@ -153,7 +152,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -165,7 +164,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -171,7 +170,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -183,7 +182,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PathTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PathTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/PathTypeDescriptor.java (working copy) @@ -25,13 +25,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -40,8 +40,8 @@ public PathTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "pathType"; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "pathType"; } //-- org.exolab.castor.builder.binding.PathTypeDescriptor() @@ -64,7 +64,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -76,7 +76,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -82,7 +82,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -94,7 +94,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/XMLBindingComponent.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/XMLBindingComponent.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/XMLBindingComponent.java (working copy) @@ -48,6 +48,8 @@ */ package org.exolab.castor.builder.binding; +import java.util.Enumeration; + import org.exolab.castor.builder.BindingComponent; import org.exolab.castor.builder.BuilderConfiguration; import org.exolab.castor.builder.GroupNaming; @@ -70,8 +72,6 @@ import org.exolab.castor.xml.schema.XMLType; import org.exolab.javasource.JClass; -import java.util.Enumeration; - /** * This class is the implementation of BindingComponent from an XML Schema point * of view. This specific implementation wraps an XML Schema annotated @@ -96,7 +96,6 @@ * that the user controls by changing the view on the Annotated Structure he is * interested in. *

- * TODO: add the link to the documentation. * * @see org.exolab.castor.builder.BindingComponent * @@ -105,7 +104,6 @@ * @version $Revision$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $ */ public final class XMLBindingComponent implements BindingComponent { - /** * The Extended Binding used to retrieve the ComponentBindingType. */ @@ -158,9 +156,6 @@ /** * A GroupNaming helper class used to named anonymous groups. - *

- * TODO: this property used to be static; currently, I don't see a reason as - * to why this was/is required. Anybody ? */ private GroupNaming _groupNaming = null; @@ -773,10 +768,8 @@ _javaClassName = JavaNaming.toJavaClassName(result); } - /* - * TODO: ADD A SWITCH TO DETERMINE WETHER OR NOT TO USE JAVA CONVENTIONS - * FOR THE JAVA CLASS NAME (SEE JAXB) - */ + // TODO ADD A SWITCH TO DETERMINE WETHER OR NOT TO USE JAVA CONVENTIONS + // FOR THE JAVA CLASS NAME (SEE JAXB) return _javaClassName; } @@ -889,10 +882,8 @@ _javaMemberName = JavaNaming.toJavaMemberName(result); } - /* - * TODO: ADD A SWITCH TO DETERMINE WETHER OR NOT TO USE JAVA CONVENTIONS - * FOR THE JAVA CLASS NAME (SEE JAXB) - */ + // TODO ADD A SWITCH TO DETERMINE WETHER OR NOT TO USE JAVA CONVENTIONS + // FOR THE JAVA CLASS NAME (SEE JAXB) return _javaMemberName; } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/package.html =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/package.html (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/package.html (working copy) @@ -1,35 +1,37 @@ - -

The Binding File Object Model

- -
-
Version:
$Revision$
-
Author:
-
Arnaud Blandin
-
Author:
-
Keith Visco
- -
- -

- This package contains the object model that represents an in-memory binding file. - The binding file allows one to customize the source generated by the - Castor Source Generator. -

- -

- The class {@link org.exolab.castor.builder.binding.XMLBindingComponent} - is the XML Schema driven implementation of - {@link org.exolab.castor.builder.BindingComponent} and contains the logic to bind - an XML Schema structure to a java property. - More information may be obtained in the Castor documentation. -

- -

- Much of the source in this package is itself generated using the - Castor Source Generator and the schema - src/main/resources/org/exolab/castor/builder/binding/binding.xsd. -

- - + + Binding File Object Model for Castor XML code generator + + +

Binding File Object Model for Castor XML code generator

+ +
+
Version:
$Revision$
+
Author:
+
Arnaud Blandin
+
Author:
+
Keith Visco
+ +
+ +

+ This package contains the object model that represents an in-memory binding file. + The binding file allows one to customize the source generated by the + Castor Source Generator. +

+ +

+ The class {@link org.exolab.castor.builder.binding.XMLBindingComponent} + is the XML Schema driven implementation of + {@link org.exolab.castor.builder.BindingComponent} and contains the logic to bind + an XML Schema structure to a java property. + More information may be obtained in the Castor documentation. +

+ +

+ Much of the source in this package is itself generated using the + Castor Source Generator and the schema + src/main/resources/org/exolab/castor/builder/binding/binding.xsd. +

+ Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/BindingType.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/BindingType.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/BindingType.java (working copy) @@ -52,9 +52,9 @@ private static java.util.Hashtable _memberTable = init(); - private int type = -1; + private int _type = -1; - private java.lang.String stringValue = null; + private java.lang.String _stringValue = null; //----------------/ @@ -63,8 +63,8 @@ private BindingType(final int type, final java.lang.String value) { super(); - this.type = type; - this.stringValue = value; + this._type = type; + this._stringValue = value; } //-- org.exolab.castor.builder.binding.types.BindingType(int, java.lang.String) @@ -84,7 +84,7 @@ * Returns the type of this BindingType. **/ public int getType() { - return this.type; + return this._type; } //-- int getType() /** @@ -100,7 +100,7 @@ * Returns the String representation of this BindingType. **/ public java.lang.String toString() { - return this.stringValue; + return this._stringValue; } //-- java.lang.String toString() /** Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/BindingTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/BindingTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/BindingTypeDescriptor.java (working copy) @@ -25,13 +25,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -40,8 +40,8 @@ public BindingTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "bindingType"; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "bindingType"; } //-- org.exolab.castor.builder.binding.types.BindingTypeDescriptor() @@ -64,7 +64,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -76,7 +76,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -82,7 +82,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -94,7 +94,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeCollectionType.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeCollectionType.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeCollectionType.java (working copy) @@ -137,9 +137,9 @@ private static java.util.Hashtable _memberTable = init(); - private int type = -1; + private int _type = -1; - private java.lang.String stringValue = null; + private java.lang.String _stringValue = null; //----------------/ @@ -148,8 +148,8 @@ private FieldTypeCollectionType(final int type, final java.lang.String value) { super(); - this.type = type; - this.stringValue = value; + this._type = type; + this._stringValue = value; } //-- org.exolab.castor.builder.binding.types.FieldTypeCollectionType(int, java.lang.String) @@ -169,7 +169,7 @@ * Returns the type of this FieldTypeCollectionType. **/ public int getType() { - return this.type; + return this._type; } //-- int getType() /** @@ -194,7 +194,7 @@ * FieldTypeCollectionType. **/ public java.lang.String toString() { - return this.stringValue; + return this._stringValue; } //-- java.lang.String toString() /** Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeCollectionTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeCollectionTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeCollectionTypeDescriptor.java (working copy) @@ -25,13 +25,13 @@ //- Class/Member Variables -/ //--------------------------/ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; - private java.lang.String nsURI; + private java.lang.String _nsURI; - private java.lang.String xmlName; + private java.lang.String _xmlName; - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -40,8 +40,8 @@ public FieldTypeCollectionTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "FieldTypeCollectionType"; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "FieldTypeCollectionType"; } //-- org.exolab.castor.builder.binding.types.FieldTypeCollectionTypeDescriptor() @@ -64,7 +64,7 @@ /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -76,7 +76,7 @@ /** **/ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -82,7 +82,7 @@ /** **/ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -94,7 +94,7 @@ /** **/ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeVisibilityType.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeVisibilityType.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeVisibilityType.java (working copy) @@ -66,7 +66,7 @@ /** * Field type. */ - private int type = -1; + private int _type = -1; /** * Field stringValue. @@ -71,7 +71,7 @@ /** * Field stringValue. */ - private java.lang.String stringValue = null; + private java.lang.String _stringValue = null; //----------------/ @@ -80,8 +80,8 @@ private FieldTypeVisibilityType(final int type, final java.lang.String value) { super(); - this.type = type; - this.stringValue = value; + this._type = type; + this._stringValue = value; } //-- org.exolab.castor.builder.binding.types.FieldTypeVisibilityType(int, java.lang.String) @@ -110,7 +110,7 @@ * @return the type of this FieldTypeVisibilityType */ public int getType() { - return this.type; + return this._type; } //-- int getType() /** @@ -135,7 +135,7 @@ * @return this deserialized object */ private java.lang.Object readResolve() { - return valueOf(this.stringValue); + return valueOf(this._stringValue); } //-- java.lang.Object readResolve() /** @@ -148,7 +148,7 @@ * FieldTypeVisibilityType */ public java.lang.String toString() { - return this.stringValue; + return this._stringValue; } //-- java.lang.String toString() /** Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeVisibilityTypeDescriptor.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeVisibilityTypeDescriptor.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/binding/types/FieldTypeVisibilityTypeDescriptor.java (working copy) @@ -23,7 +23,7 @@ /** * Field elementDefinition. */ - private boolean elementDefinition; + private boolean _elementDefinition; /** * Field nsPrefix. @@ -28,7 +28,7 @@ /** * Field nsPrefix. */ - private java.lang.String nsPrefix; + private java.lang.String _nsPrefix; /** * Field nsURI. @@ -33,7 +33,7 @@ /** * Field nsURI. */ - private java.lang.String nsURI; + private java.lang.String _nsURI; /** * Field xmlName. @@ -38,7 +38,7 @@ /** * Field xmlName. */ - private java.lang.String xmlName; + private java.lang.String _xmlName; /** * Field identity. @@ -43,7 +43,7 @@ /** * Field identity. */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; + private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ @@ -52,9 +52,9 @@ public FieldTypeVisibilityTypeDescriptor() { super(); - nsURI = "http://www.castor.org/SourceGenerator/Binding"; - xmlName = "FieldTypeVisibilityType"; - elementDefinition = false; + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "FieldTypeVisibilityType"; + _elementDefinition = false; } //-- org.exolab.castor.builder.binding.types.FieldTypeVisibilityTypeDescriptor() @@ -88,7 +88,7 @@ * identity. */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - return identity; + return _identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** @@ -106,7 +106,7 @@ * @return the namespace prefix to use when marshalling as XML. */ public java.lang.String getNameSpacePrefix() { - return nsPrefix; + return _nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** @@ -116,7 +116,7 @@ * unmarshalling as XML. */ public java.lang.String getNameSpaceURI() { - return nsURI; + return _nsURI; } //-- java.lang.String getNameSpaceURI() /** @@ -135,7 +135,7 @@ * @return the XML Name for the Class being described. */ public java.lang.String getXMLName() { - return xmlName; + return _xmlName; } //-- java.lang.String getXMLName() /** @@ -146,7 +146,7 @@ * element or element with anonymous type definition. */ public boolean isElementDefinition() { - return elementDefinition; + return _elementDefinition; } //-- boolean isElementDefinition() } Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/descriptors/DescriptorJClass.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/descriptors/DescriptorJClass.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/descriptors/DescriptorJClass.java (working copy) @@ -144,14 +144,14 @@ } } - addField(new JField(JType.BOOLEAN, "elementDefinition")); + addField(new JField(JType.BOOLEAN, "_elementDefinition")); - addField(new JField(SGTypes.String, "nsPrefix")); - addField(new JField(SGTypes.String, "nsURI")); - addField(new JField(SGTypes.String, "xmlName")); + addField(new JField(SGTypes.STRING, "_nsPrefix")); + addField(new JField(SGTypes.STRING, "_nsURI")); + addField(new JField(SGTypes.STRING, "_xmlName")); //-- if there is a super class, the identity field must remain //-- the same than the one in the super class - addField(new JField(XML_FIELD_DESCRIPTOR_CLASS, "identity")); + addField(new JField(XML_FIELD_DESCRIPTOR_CLASS, "_identity")); //-- create default constructor addDefaultConstructor(extended); @@ -233,7 +233,7 @@ "true if XML schema definition of this Class is that of a global\n" + "element or element with anonymous type definition."); JSourceCode jsc = getElementDefinition.getSourceCode(); - jsc.add("return elementDefinition;"); + jsc.add("return _elementDefinition;"); addMethod(getElementDefinition); } @@ -245,7 +245,7 @@ JMethod method; JSourceCode jsc; //-- create getNameSpacePrefix method - method = new JMethod("getNameSpacePrefix", SGTypes.String, + method = new JMethod("getNameSpacePrefix", SGTypes.STRING, "the namespace prefix to use when marshaling as XML."); if (_config.useJava50()) { @@ -253,11 +253,11 @@ } jsc = method.getSourceCode(); - jsc.add("return nsPrefix;"); + jsc.add("return _nsPrefix;"); addMethod(method); //-- create getNameSpaceURI method - method = new JMethod("getNameSpaceURI", SGTypes.String, + method = new JMethod("getNameSpaceURI", SGTypes.STRING, "the namespace URI used when marshaling and unmarshaling as XML."); if (_config.useJava50()) { @@ -265,7 +265,7 @@ } jsc = method.getSourceCode(); - jsc.add("return nsURI;"); + jsc.add("return _nsURI;"); addMethod(method); //-- create getValidator method @@ -282,7 +282,7 @@ addMethod(method); //-- create getXMLName method - method = new JMethod("getXMLName", SGTypes.String, + method = new JMethod("getXMLName", SGTypes.STRING, "the XML Name for the Class being described."); if (_config.useJava50()) { @@ -290,7 +290,7 @@ } jsc = method.getSourceCode(); - jsc.add("return xmlName;"); + jsc.add("return _xmlName;"); addMethod(method); } @@ -325,7 +325,7 @@ jsc = getIdentity.getSourceCode(); if (extended) { - jsc.add("if (identity == null) {"); + jsc.add("if (_identity == null) {"); jsc.indent(); jsc.add("return super.getIdentity();"); jsc.unindent(); @@ -331,7 +331,7 @@ jsc.unindent(); jsc.add("}"); } - jsc.add("return identity;"); + jsc.add("return _identity;"); //--don't add the type to the import list addMethod(getIdentity, false); @@ -337,7 +337,7 @@ addMethod(getIdentity, false); //-- create getJavaClass method - JMethod getJavaClass = new JMethod("getJavaClass", SGTypes.Class, + JMethod getJavaClass = new JMethod("getJavaClass", SGTypes.CLASS, "the Java class represented by this descriptor."); if (_config.useJava50()) { Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/descriptors/DescriptorSourceFactory.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/descriptors/DescriptorSourceFactory.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/descriptors/DescriptorSourceFactory.java (working copy) @@ -122,7 +122,7 @@ //-- Set namespace prefix String nsPrefix = classInfo.getNamespacePrefix(); if ((nsPrefix != null) && (nsPrefix.length() > 0)) { - jsc.add("nsPrefix = \""); + jsc.add("_nsPrefix = \""); jsc.append(nsPrefix); jsc.append("\";"); } @@ -130,7 +130,7 @@ //-- Set namespace URI String nsURI = classInfo.getNamespaceURI(); if ((nsURI != null) && (nsURI.length() > 0)) { - jsc.add("nsURI = \""); + jsc.add("_nsURI = \""); jsc.append(nsURI); jsc.append("\";"); } @@ -138,7 +138,7 @@ //-- set XML Name String xmlName = classInfo.getNodeName(); if (xmlName != null) { - jsc.add("xmlName = \""); + jsc.add("_xmlName = \""); jsc.append(xmlName); jsc.append("\";"); } @@ -145,7 +145,7 @@ //-- set Element Definition flag boolean elementDefinition = classInfo.isElementDefinition(); - jsc.add("elementDefinition = "); + jsc.add("_elementDefinition = "); jsc.append(new Boolean(elementDefinition).toString()); jsc.append(";"); @@ -280,7 +280,7 @@ jsc.add("desc = (org.exolab.castor.xml.util.XMLFieldDescriptorImpl) getFieldDescriptor(\""); jsc.append(member.getNodeName()); jsc.append("\""); - jsc.append(", nsURI"); + jsc.append(", _nsURI"); if (member.getNodeType() == XMLInfo.ELEMENT_TYPE) { jsc.append(", org.exolab.castor.xml.NodeType.Element);"); } else if (member.getNodeType() == XMLInfo.ATTRIBUTE_TYPE) { @@ -339,7 +339,7 @@ publicStaticFinal.makePublic(); publicStaticFinal.setStatic(true); publicStaticFinal.setFinal(true); - JField jField = new JField(SGTypes.String, nodeNameParam); + JField jField = new JField(SGTypes.STRING, nodeNameParam); jField.setModifiers(publicStaticFinal); jField.setInitString("\"" + nodeName + "\""); classDesc.addMember(jField); @@ -377,7 +377,7 @@ jsc.add("desc.setReference(true);"); break; case XSType.ID_TYPE : - jsc.add("this.identity = desc;"); + jsc.add("this._identity = desc;"); break; case XSType.QNAME_TYPE : jsc.add("desc.setSchemaType(\"QName\");"); @@ -400,7 +400,7 @@ jsc.add(GENERALIZED_FIELD_HANDLER_CLASS.getName()); jsc.append(" gfh = ("); jsc.append(GENERALIZED_FIELD_HANDLER_CLASS.getName()); - jsc.append(")handler;"); + jsc.append(") handler;"); _xmlFieldHandlerFactory.createXMLFieldHandler( member, xsType, localClassName, jsc, true); jsc.add("gfh.setFieldHandler(handler);"); Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/info/CollectionInfo.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/info/CollectionInfo.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/info/CollectionInfo.java (working copy) @@ -61,7 +61,6 @@ import org.exolab.javasource.JDocDescriptor; import org.exolab.javasource.JMethod; import org.exolab.javasource.JParameter; -import org.exolab.javasource.JPrimitiveType; import org.exolab.javasource.JSourceCode; import org.exolab.javasource.JType; @@ -239,7 +238,7 @@ } } // -- setReferenceMethodSuffix - private final void addIndexCheck(final JSourceCode sourceCode, final String methodName) { + private void addIndexCheck(final JSourceCode sourceCode, final String methodName) { sourceCode.add("// check bounds for index"); sourceCode.add("if (index < 0 || index >= this."); sourceCode.append(this.getName()); @@ -280,7 +279,7 @@ protected void createAddMethod(final JClass jClass) { JMethod method = new JMethod(this.getWriteMethodName()); - method.addException(SGTypes.IndexOutOfBoundsException, + method.addException(SGTypes.INDEX_OUT_OF_BOUNDS_EXCEPTION, "if the index given is outside the bounds of the collection"); final JParameter parameter = new JParameter( this.getContentType().getJType(), this.getContentName()); @@ -427,7 +426,7 @@ JMethod method = new JMethod(this.getReadMethodName(), contentType.getJType(), "the value of the " + contentType.getJType().toString() + " at the given index"); - method.addException(SGTypes.IndexOutOfBoundsException, + method.addException(SGTypes.INDEX_OUT_OF_BOUNDS_EXCEPTION, "if the index given is outside the bounds of the collection"); method.addParameter(new JParameter(JType.INT, "index")); @@ -510,7 +509,7 @@ protected void createAddByIndexMethod(final JClass jClass) { JMethod method = new JMethod(this.getWriteMethodName()); - method.addException(SGTypes.IndexOutOfBoundsException, + method.addException(SGTypes.INDEX_OUT_OF_BOUNDS_EXCEPTION, "if the index given is outside the bounds of the collection"); method.addParameter(new JParameter(JType.INT, "index")); final JParameter parameter = new JParameter( @@ -755,7 +754,7 @@ jClass.addMethod(method); } - private final String getParameterPrefix() { + private String getParameterPrefix() { return _parameterPrefix; } @@ -762,7 +761,7 @@ protected void createSetByIndexMethod(final JClass jClass) { JMethod method = new JMethod("set" + this.getMethodSuffix()); - method.addException(SGTypes.IndexOutOfBoundsException, + method.addException(SGTypes.INDEX_OUT_OF_BOUNDS_EXCEPTION, "if the index given is outside the bounds of the collection"); method.addParameter(new JParameter(JType.INT, "index")); method.addParameter(new JParameter(this.getContentType().getJType(), Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/info/CollectionInfoJ2.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/info/CollectionInfoJ2.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/info/CollectionInfoJ2.java (working copy) @@ -116,7 +116,7 @@ */ protected final void createAddMethod(final JClass jClass) { JMethod method = new JMethod(this.getWriteMethodName()); - method.addException(SGTypes.IndexOutOfBoundsException, + method.addException(SGTypes.INDEX_OUT_OF_BOUNDS_EXCEPTION, "if the index given is outside the bounds of the collection"); final JParameter parameter = new JParameter(this.getContentType().getJType(), this.getContentName()); Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/info/IdentityInfo.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/info/IdentityInfo.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/info/IdentityInfo.java (working copy) @@ -117,7 +117,7 @@ } private JMethod makeGetReferenceIdMethod() { - JMethod method = new JMethod("getReferenceId", SGTypes.String, + JMethod method = new JMethod("getReferenceId", SGTypes.STRING, "the reference ID"); JSourceCode jsc = method.getSourceCode(); jsc.add("return this."); Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/package.html =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/package.html (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/castor/builder/package.html (working copy) @@ -1,40 +1,43 @@ - -

The Source Code Generator API

- -
-
Version:
$Revision$
-
Author:
-
Keith Visco
-
Author:
-
Arnaud Blandin
-
- -

- This package is primarily used with Castor XML, however some people do - use it for Castor JDO. Some incompatabilities may exist. -

- -

- The class {@link org.exolab.castor.builder.SourceGenerator} - is used for creating Java source code from an XML Schema. Currently - the version of XML Schema that is supported by the SourceGenerator is - a subset of the W3C XML Schema 1.0 Recommendation (20010502). - A binding file can be used to customize - the generated sources. More information may be obtained in the Castor documentation. -

- -

- The class {@link org.exolab.castor.builder.SourceGeneratorMain} - is the main(String[]) entry point used when invoking the source generator - from the command line. This class parses the command-line arguments, - sets up the proper configuration, and then passes control to - org.exolab.castor.builder.SourceGenerator. -

- -

- The file org/exolab/castor/builder/castorbuilder.properties - is used for configuring some advanced options. -

- + + Castor XML code generator + + +

Castor XML code generator

+ +
+
Version:
$Revision$
+
Author:
+
Keith Visco
+
Author:
+
Arnaud Blandin
+
+ +

+ This package is primarily used with Castor XML, however some people do + use it for Castor JDO. Some incompatabilities may exist. +

+ +

+ The class {@link org.exolab.castor.builder.SourceGenerator} + is used for creating Java source code from an XML Schema. Currently + the version of XML Schema that is supported by the SourceGenerator is + a subset of the W3C XML Schema 1.0 Recommendation (20010502). + A binding file can be used to customize + the generated sources. More information may be obtained in the Castor documentation. +

+ +

+ The class {@link org.exolab.castor.builder.SourceGeneratorMain} + is the main(String[]) entry point used when invoking the source generator + from the command line. This class parses the command-line arguments, + sets up the proper configuration, and then passes control to + org.exolab.castor.builder.SourceGenerator. +

+ +

+ The file org/exolab/castor/builder/castorbuilder.properties + is used for configuring some advanced options. +

+ Index: C:/Java/castor-1/codegen/src/main/java/org/exolab/javasource/JSourceCode.java =================================================================== --- C:/Java/castor-1/codegen/src/main/java/org/exolab/javasource/JSourceCode.java (revision 6710) +++ C:/Java/castor-1/codegen/src/main/java/org/exolab/javasource/JSourceCode.java (working copy) @@ -42,6 +42,8 @@ */ package org.exolab.javasource; +import java.text.MessageFormat; +import java.util.StringTokenizer; import java.util.Vector; /** @@ -92,15 +94,61 @@ //-------------------------------------------------------------------------- /** - * Adds the given statement to this JSourceCode. The statement will be added - * on a new line. + * Adds statement generated by replacing parameters of given pattern with given argument to + * this JSourceCode. The statement will be added on a new line. + * + * @param pattern Pattern for the statement. + * @param argument Argument to replace first parameter in pattern. + */ + public void add(final String pattern, final Object argument) { + add(pattern, new Object[] {argument}); + } + + /** + * Adds statement generated by replacing parameters of given pattern with given arguments to + * this JSourceCode. The statement will be added on a new line. + * + * @param pattern Pattern for the statement. + * @param argument1 Argument to replace first parameter in pattern. + * @param argument2 Argument to replace second parameter in pattern. + */ + public void add(final String pattern, final Object argument1, final Object argument2) { + add(pattern, new Object[] {argument1, argument2}); + } + + /** + * Adds statements generated by replacing parameters of given pattern with given arguments to + * this JSourceCode. Multiple statements can be separated by '\n' characters. Each statement + * will be added on a new line. If that statement starts with whitespace characters it will + * be indented. + * + * @param pattern Pattern for the statement. + * @param arguments Arguments to replace parameters in pattern. + */ + public void add(final String pattern, final Object[] arguments) { + StringTokenizer tokenizer = new StringTokenizer(pattern, "\n"); + while (tokenizer.hasMoreTokens()) { addWithIndent(tokenizer.nextToken(), arguments); } + } + + /** + * Adds statement generated by replacing parameters of given pattern with given arguments to + * this JSourceCode. The statement will be added on a new line. If the statement starts with + * whitespace characters the statement will be indented. * - * @param statement The statement to add. + * @param pattern Pattern for the statement. + * @param arguments Arguments to replace parameters in pattern. */ - public void add(final String statement) { - JCodeStatement jcs = new JCodeStatement(statement, _currentIndent); - _source.addElement(jcs); - } //-- add + private void addWithIndent(final String pattern, final Object[] arguments) { + if (pattern.startsWith(" ")) { + indent(); + addWithIndent(pattern.substring(1), arguments); + unindent(); + } else if ((pattern.indexOf('{') >= 0) && (pattern.indexOf('}') >= 0)) { + add(MessageFormat.format(pattern, arguments)); + } else { + add(pattern); + } + } /** * Adds the given statement to this JSourceCode. The statement will be added @@ -107,12 +155,9 @@ * on a new line. * * @param statement The statement to add. - * @param indentSize The size of the indentation to use when printing this JSourceCode. - * @see #print(JSourceWriter) */ - public void add(final String statement, final short indentSize) { - JCodeStatement jcs = new JCodeStatement(statement, indentSize); - _source.addElement(jcs); + public void add(final String statement) { + _source.addElement(new JCodeStatement(statement, _currentIndent)); } /** @@ -128,8 +173,7 @@ */ public void addIndented(final String statement) { indent(); - JCodeStatement jcs = new JCodeStatement(statement, _currentIndent); - _source.addElement(jcs); + _source.addElement(new JCodeStatement(statement, _currentIndent)); unindent(); } Index: C:/Java/castor-1/src/doc/release-notes.xml =================================================================== --- C:/Java/castor-1/src/doc/release-notes.xml (revision 6712) +++ C:/Java/castor-1/src/doc/release-notes.xml (working copy) @@ -34,6 +34,26 @@ + + + Cleaned up 246 warnings of differnet kind in builder package. + + + Ralf Joachim + ralf.joachim@syscon-world.de + + + Ralf Joachim + ralf.joachim@syscon-world.de + + + Ralf Joachim + ralf.joachim@syscon-world.de + + Enh. + XML + 20070103 + Made org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask delegate to Index: C:/Java/castor-1/src/etc/CHANGELOG =================================================================== --- C:/Java/castor-1/src/etc/CHANGELOG (revision 6712) +++ C:/Java/castor-1/src/etc/CHANGELOG (working copy) @@ -1,6 +1,11 @@ SVN ------------------------------- +XML: Resolved issue CASTOR-1798 using contribution from Ralf Joachim [Ralf.joachim@syscon-world.de] + Cleaned up 246 warnings of differnet kind in builder package. + Details: http://jira.codehaus.org/browse/CASTOR-1798 + (Ralf - 20070103) + XML: Resolved issue CASTOR-1805 using contribution from Ralf Joachim [Ralf.joachim@syscon-world.de] Made org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask delegate to CastorCodeGenTask. Details: http://jira.codehaus.org/browse/CASTOR-1805