Package com.sun.tools.xjc.model
Class CEnumConstant
java.lang.Object
com.sun.tools.xjc.model.CEnumConstant
- All Implemented Interfaces:
CCustomizable
,EnumConstant<NType,
NClass>
public final class CEnumConstant
extends Object
implements EnumConstant<NType,NClass>, CCustomizable
Enumeration constant.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCEnumConstant
(String name, String javadoc, String lexical, XSComponent source, CCustomizations customizations, Locator loc) -
Method Summary
Modifier and TypeMethodDescriptionGets the list of customizations attached to this model component.Gets theEnumLeafInfo
to which this constant belongs to.Lexical value of this constant.Gets the source location in the schema from which this model component is created.getName()
Gets the constant name.If this model object is built from XML Schema, this property returns a schema component from which the model is built.
-
Field Details
-
name
Name of the constant. -
javadoc
Javadoc comment. Can be null.
-
-
Constructor Details
-
CEnumConstant
public CEnumConstant(String name, String javadoc, String lexical, XSComponent source, CCustomizations customizations, Locator loc) - Parameters:
name
-
-
-
Method Details
-
getEnclosingClass
Description copied from interface:EnumConstant
Gets theEnumLeafInfo
to which this constant belongs to.- Specified by:
getEnclosingClass
in interfaceEnumConstant<NType,
NClass> - Returns:
- never null.
-
getLexicalValue
Description copied from interface:EnumConstant
Lexical value of this constant.This value should be evaluated against
EnumLeafInfo.getBaseType()
to obtain the typed value.This is the same value as written in the
XmlEnumValue
annotation. In the above example, this method returns "1" and "2".- Specified by:
getLexicalValue
in interfaceEnumConstant<NType,
NClass> - Returns:
- never null.
-
getName
Description copied from interface:EnumConstant
Gets the constant name.In the above example this method return "ONE" and "TWO".
- Specified by:
getName
in interfaceEnumConstant<NType,
NClass> - Returns:
- never null. A valid Java identifier.
-
getSchemaComponent
Description copied from interface:CCustomizable
If this model object is built from XML Schema, this property returns a schema component from which the model is built.- Specified by:
getSchemaComponent
in interfaceCCustomizable
- Returns:
- null if the model is built from sources other than XML Schema (such as DTD.)
-
getCustomizations
Description copied from interface:CCustomizable
Gets the list of customizations attached to this model component.- Specified by:
getCustomizations
in interfaceCCustomizable
- Returns:
- can be an empty list but never be null. The returned list is read-only. Do not modify.
- See Also:
-
getLocator
Description copied from interface:CCustomizable
Gets the source location in the schema from which this model component is created.- Specified by:
getLocator
in interfaceCCustomizable
- Returns:
- never null.
-