com.sun.tools.xjc.model
public final class CEnumLeafInfo extends Object implements EnumLeafInfo<NType,NClass>, NClass, CNonElement
Field Summary | |
---|---|
CNonElement | base
Represents the underlying type of this enumeration
and its conversion.
|
String | javadoc |
Collection<CEnumConstant> | members
List of enum members. |
Model | model
The Model object to which this bean belongs. |
CClassInfoParent | parent
The parent into which the enum class should be generated. |
String | shortName
Short name of the generated type-safe enum. |
Constructor Summary | |
---|---|
CEnumLeafInfo(Model model, QName typeName, CClassInfoParent container, String shortName, CNonElement base, Collection<CEnumConstant> _members, XSComponent source, CCustomizations customizations, Locator _sourceLocator) |
Method Summary | |
---|---|
Element<NType,NClass> | asElement() |
boolean | canBeReferencedByIDREF() |
JExpression | createConstant(Outline outline, XmlString literal) |
String | fullName() |
CAdapter | getAdapterUse() |
NonElement<NType,NClass> | getBaseType() |
NClass | getClazz() |
Collection<CEnumConstant> | getConstants() |
CCustomizations | getCustomizations() |
QName | getElementName() |
MimeType | getExpectedMimeType() |
CNonElement | getInfo() |
Location | getLocation() |
Locator | getLocator()
Source line information that points to the place
where this type-safe enum is defined.
|
XSComponent | getSchemaComponent() |
NType | getType() |
QName | getTypeName() |
Locatable | getUpstream() |
ID | idUse() |
boolean | isAbstract() |
boolean | isBoxedType() |
boolean | isCollection() |
boolean | isElement() |
boolean | isPrimitive() |
boolean | isSimpleType() |
boolean | needsValueField()
The spec says the value field in the enum class will be generated
only under certain circumstances.
|
JClass | toType(Outline o, Aspect aspect) |
To parse XML into a constant, we use the base type to do lexical -> value, then use a map to pick up the right one.
Hence this also represents the type of the Java value. For example, if this is an enumeration of xs:int, then this field will be Java int.
Deprecated: why are you calling the method whose return value is known?
Returns: true if the generated enum class should have the value field.