Classes | |
class | Property |
Public Member Functions | |
BuilderConfiguration () | |
synchronized Properties | getDefault () |
String | getProperty (String name, String defValue) |
boolean | boundPropertiesEnabled () |
boolean | equalsMethod () |
void | setEqualsMethod (boolean equals) |
boolean | classDescFieldNames () |
boolean | generateExtraCollectionMethods () |
void | setClassDescFieldNames (boolean classDescFieldNames) |
boolean | usePrimitiveWrapper () |
void | setPrimitiveWrapper (boolean wrapper) |
boolean | useEnumeratedTypeInterface () |
void | setUseEnumeratedTypeInterface (boolean flag) |
boolean | mappingSchemaElement2Java () |
boolean | mappingSchemaType2Java () |
void | setDefaultProperties (Properties properties) |
void | setNamespacePackageMapping (String ns, String packageName) |
void | setLocationPackageMapping (String schemaLocation, String packageName) |
String | lookupPackageByNamespace (String nsURL) |
String | lookupPackageByLocation (String schemaLocation) |
Protected Member Functions | |
synchronized void | load () |
void | processNamespacePackageMappings (String mappings) |
The configuration for the SourceGenerator
org.exolab.castor.builder.BuilderConfiguration.BuilderConfiguration | ( | ) |
Creates a default BuilderConfiguration
References org.exolab.castor.builder.BuilderConfiguration.getDefault().
boolean org.exolab.castor.builder.BuilderConfiguration.boundPropertiesEnabled | ( | ) |
Returns true if bound properties are enabled.
Enabling bound properties is controlled via the org.exolab.castor.builder.boundproperties item in the castorbuilder.properties file. The value is either 'true' or 'false'.
Referenced by org.exolab.castor.builder.FactoryState.FactoryState(), org.exolab.castor.builder.binding.XMLBindingComponent.hasBoundProperties(), and org.exolab.castor.builder.MemberFactory.MemberFactory().
boolean org.exolab.castor.builder.BuilderConfiguration.classDescFieldNames | ( | ) |
Returns true if we generate a 'public static final String' for the name of each attribute and element described by the class descriptor
Enabling this property is controlled via the org.exolab.castor.builder.classdescfieldnames item in the castorbuilder.properties file. The value is either 'true' or 'false'.
boolean org.exolab.castor.builder.BuilderConfiguration.equalsMethod | ( | ) |
Returns true if we generate an 'equals' method for each generated class.
Enabling this property is controlled via the org.exolab.castor.builder.equalsmethod item in the castorbuilder.properties file. The value is either 'true' or 'false'.
Referenced by org.exolab.castor.builder.binding.XMLBindingComponent.hasEquals().
boolean org.exolab.castor.builder.BuilderConfiguration.generateExtraCollectionMethods | ( | ) |
Returns true if extra methods for collection fields should be generated. Such methods include set/get methods for the actual collection in addition to the array methods.
Enabling extra collection methods is controlled via the org.exolab.castor.builder.extraCollectionMethods property in the castorbuilder.properties file. The value is either 'true' or 'false'.
Referenced by org.exolab.castor.builder.MemberFactory.MemberFactory().
synchronized Properties org.exolab.castor.builder.BuilderConfiguration.getDefault | ( | ) |
Returns the default configuration file. Changes to the returned properties set will affect all Castor functions relying on the default configuration.
References org.exolab.castor.builder.BuilderConfiguration.load().
Referenced by org.exolab.castor.builder.BuilderConfiguration.BuilderConfiguration().
String org.exolab.castor.builder.BuilderConfiguration.getProperty | ( | String | name, | |
String | defValue | |||
) |
Returns a property from the default configuration file. Equivalent to calling getProperty
on the result of getDefault.
name | The property name | |
default | The property's default value |
Referenced by org.exolab.castor.builder.binding.XMLBindingComponent.getExtends(), and org.exolab.castor.builder.MemberFactory.MemberFactory().
synchronized void org.exolab.castor.builder.BuilderConfiguration.load | ( | ) | [protected] |
Called by getDefault to load the configuration the first time. Will not complain about inability to load configuration file from one of the default directories, but if it cannot find the JAR's configuration file, will throw a run time exception.
References org.exolab.castor.util.Configuration.getProperty(), and org.exolab.castor.builder.BuilderConfiguration.processNamespacePackageMappings().
Referenced by org.exolab.castor.builder.BuilderConfiguration.getDefault(), and org.exolab.castor.builder.SourceGenerator.SourceGenerator().
String org.exolab.castor.builder.BuilderConfiguration.lookupPackageByLocation | ( | String | schemaLocation | ) |
Gets a Java package to a schema location.
Referenced by org.exolab.castor.builder.binding.XMLBindingComponent.getJavaPackage().
String org.exolab.castor.builder.BuilderConfiguration.lookupPackageByNamespace | ( | String | nsURL | ) |
Gets a Java package to an XML namespace URL
Referenced by org.exolab.castor.builder.TypeConversion.convertType(), org.exolab.castor.builder.binding.XMLBindingComponent.getJavaPackage(), and org.exolab.castor.builder.binding.XMLBindingComponent.getJavaType().
boolean org.exolab.castor.builder.BuilderConfiguration.mappingSchemaElement2Java | ( | ) |
Tests the org.exolab.castor.builder.javaclassmapping property for the 'element' value.
Reimplemented in org.exolab.castor.builder.SourceGenerator.
Referenced by org.exolab.castor.builder.binding.XMLBindingComponent.isAbstract().
boolean org.exolab.castor.builder.BuilderConfiguration.mappingSchemaType2Java | ( | ) |
Tests the org.exolab.castor.builder.javaclassmapping property for the 'type' value.
Reimplemented in org.exolab.castor.builder.SourceGenerator.
Referenced by org.exolab.castor.builder.MemberFactory.createFieldInfo().
void org.exolab.castor.builder.BuilderConfiguration.processNamespacePackageMappings | ( | String | mappings | ) | [protected] |
processes the given String which contains namespace-to-package mappings
mappings | the namespace-to-package mappings |
Referenced by org.exolab.castor.builder.BuilderConfiguration.load(), and org.exolab.castor.builder.BuilderConfiguration.setDefaultProperties().
void org.exolab.castor.builder.BuilderConfiguration.setClassDescFieldNames | ( | boolean | classDescFieldNames | ) |
Sets the 'classDescFieldNames' property
boolean | the value we want to ues |
Referenced by alma.tools.entitybuilder.CastorBuilder.run().
void org.exolab.castor.builder.BuilderConfiguration.setDefaultProperties | ( | Properties | properties | ) |
Overrides the current set of properties with the given properties. Once the properties are set, only a copy will be uses, so any changes to the given properties file after the fact will go unnoticed.
properties | the Properties file |
References org.exolab.castor.builder.BuilderConfiguration.processNamespacePackageMappings().
void org.exolab.castor.builder.BuilderConfiguration.setEqualsMethod | ( | boolean | equals | ) |
Sets the 'equalsmethod' property
boolean | the value we want to use |
Referenced by alma.tools.entitybuilder.CastorBuilder.run().
void org.exolab.castor.builder.BuilderConfiguration.setLocationPackageMapping | ( | String | schemaLocation, | |
String | packageName | |||
) |
Sets the schemaLocation to package mapping
schemaLocation | the schemaLocation to map | |
packageName | the package name to map to |
Referenced by org.exolab.castor.builder.SourceGenerator.generateSource(), and alma.tools.entitybuilder.CastorBuilder.run().
void org.exolab.castor.builder.BuilderConfiguration.setNamespacePackageMapping | ( | String | ns, | |
String | packageName | |||
) |
Sets the namespace to package mapping
ns | the namespace URI to map | |
packageName | the package name |
Referenced by alma.tools.entitybuilder.CastorBuilder.run().
void org.exolab.castor.builder.BuilderConfiguration.setPrimitiveWrapper | ( | boolean | wrapper | ) |
Sets the 'primitivetowrapper' property
boolean | the value we want to use. |
Referenced by alma.tools.entitybuilder.CastorBuilder.run().
void org.exolab.castor.builder.BuilderConfiguration.setUseEnumeratedTypeInterface | ( | boolean | flag | ) |
Sets the 'enumTypeAccessInterface' property
boolean | the value we want to use |
boolean org.exolab.castor.builder.BuilderConfiguration.useEnumeratedTypeInterface | ( | ) |
Returns true if we generate the implements EnumeratedTypeAccess interface for enumerated type classes. The value is either 'true' or 'false'
boolean org.exolab.castor.builder.BuilderConfiguration.usePrimitiveWrapper | ( | ) |
Returns true if primitive types have to be used as Objects (eg. replacing float by java.lang.Float).
Referenced by org.exolab.castor.builder.TypeConversion.convertType(), and org.exolab.castor.builder.binding.XMLBindingComponent.useWrapper().