public final class EnumerationFactory extends BaseFactory
| Constructor | Description |
|---|---|
EnumerationFactory(BuilderConfiguration config,
GroupNaming groupNaming,
SourceGenerator sourceGenerator) |
Creates a new EnumerationFactory for the builder configuration given.
|
| Modifier and Type | Method | Description |
|---|---|---|
(package private) void |
processEnumerationAsBaseType(ExtendedBinding binding,
SimpleType simpleType,
FactoryState state) |
Creates all the necessary enumeration code from the given SimpleType.
|
(package private) void |
processEnumerationAsNewObject(ExtendedBinding binding,
SimpleType simpleType,
FactoryState state) |
Creates all the necessary enumeration code for a given SimpleType.
|
void |
setCaseInsensitive(boolean caseInsensitive) |
Set to true if enumerated type lookups should be performed in a case
insensitive manner.
|
createComment, extractCommentsFromAnnotations, getConfig, getGroupNaming, getInfoFactory, getJavaNaming, getSourceGenerator, normalize, setGroupNamingpublic EnumerationFactory(BuilderConfiguration config, GroupNaming groupNaming, SourceGenerator sourceGenerator)
config - the current BuilderConfiguration instance.groupNaming - The group naming scheme to be used.sourceGenerator - the calling source generator.void processEnumerationAsNewObject(ExtendedBinding binding, SimpleType simpleType, FactoryState state)
binding - Extended binding instancesimpleType - the SimpleType we are processing an enumeration forstate - our current stateprocessEnumerationAsBaseType(org.exolab.castor.builder.binding.ExtendedBinding, org.exolab.castor.xml.schema.SimpleType, org.exolab.castor.builder.FactoryState)void processEnumerationAsBaseType(ExtendedBinding binding, SimpleType simpleType, FactoryState state)
public class {name} {
// list of values
{type}[] values = {
...
};
// Returns true if the given value is part
// of this enumeration
public boolean contains({type} value);
// Returns the {type} value whose String value
// is equal to the given String
public {type} valueOf(String strValue);
}
binding - Extended binding instancesimpleType - the SimpleType we are processing an enumeration forstate - our current statepublic void setCaseInsensitive(boolean caseInsensitive)
caseInsensitive - when trueIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com