| Modifier and Type | Field and Description |
|---|---|
| public final CNonElement | base
Represents the underlying type of this enumeration and its conversion. |
| private final CCustomizations | |
| public String | |
| public final Collection | members
List of enum members. |
| public final Model | |
| public final CClassInfoParent | parent
The parent into which the enum class should be generated. |
| public final String | shortName
Short name of the generated type-safe enum. |
| private final XSComponent | |
| private final Locator | |
| private final QName |
| Access | Constructor and Description |
|---|---|
| public | CEnumLeafInfo(Model model, QName typeName, CClassInfoParent container, String shortName, CNonElement base, Collection<CEnumConstant> _members, XSComponent source, CCustomizations customizations, Locator _sourceLocator)
|
| Modifier and Type | Method and Description |
|---|---|
| public Element | |
| public boolean | canBeReferencedByIDREF()
Implements org.
Deprecated
why are you calling the method whose return value is known?
True if this type is a valid target from a property annotated with |
| public JExpression | createConstant(Outline outline, XmlString literal)
Implements com. Creates a constant for the given lexical value. |
| public String | |
| public CAdapter | getAdapterUse()
Implements com.
Deprecated
Guaranteed to return null. |
| public NonElement | getBaseType()
Implements org. Returns the base type of the enumeration. |
| public NClass | getClazz()
Implements org. The same as |
| public Collection | getConstants()
Implements org. Returns the read-only list of enumeration constants. |
| public CCustomizations | getCustomizations()
Implements com. Gets the list of customizations attached to this model component. |
| public QName | getElementName()
Implements org. Gets the element name of the class, if the class is bound to an element. |
| public MimeType | getExpectedMimeType()
Implements com. A can have an associated MIME type. |
| public CNonElement | getInfo()
Implements com.
Deprecated
Guaranteed to return this. |
| public Location | getLocation()
Implements org. Gets the location object that this object points to. |
| public Locator | getLocator()
Implements com. Source line information that points to the place where this type-safe enum is defined. |
| public XSComponent | getSchemaComponent()
Implements com. If this model object is built from XML Schema, this property returns a schema component from which the model is built. |
| public NType | getType()
Implements org. Gets the underlying Java type that object represents. |
| public QName | getTypeName()
Implements org. Gets the primary XML type ANYTYPE_NAME of the class. |
| public Locatable | getUpstream()
Implements org. Gets the upstream |
| public ID | idUse()
Implements com. Whether the referenced type (individual item type in case of collection) is ID/IDREF. |
| public boolean | |
| public boolean | isBoxedType()
Implements com. Returns true iff this type represents a class that has a unboxed form. |
| public boolean | isCollection()
Implements com.
Deprecated
Guaranteed to return false. |
| public boolean | isElement()
Implements org. If the class is bound to an element, return true. |
| public boolean | |
| public boolean | isSimpleType()
Implements org. Returns true if this maps to text in XML, without any attribute nor child elements. |
| public boolean | Returns: true if the generated enum class should have the value field.The spec says the value field in the enum class will be generated only under certain circumstances. |
| public JClass | toType(Outline o, Aspect aspect)
Implements com. Returns the representation of this type in code model. |
| base | back to summary |
|---|---|
| public final CNonElement base Represents the underlying type of this enumeration and its conversion.
To parse XML into a constant, we use the base type
to do 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. | |
| customizations | back to summary |
|---|---|
| private final CCustomizations customizations | |
| javadoc | back to summary |
|---|---|
| public String javadoc | |
| members | back to summary |
|---|---|
| public final Collection<CEnumConstant> members List of enum members. | |
| model | back to summary |
|---|---|
| public final Model model The | |
| parent | back to summary |
|---|---|
| public final CClassInfoParent parent The parent into which the enum class should be generated. | |
| shortName | back to summary |
|---|---|
| public final String shortName Short name of the generated type-safe enum. | |
| source | back to summary |
|---|---|
| private final XSComponent source | |
| sourceLocator | back to summary |
|---|---|
private final Locator sourceLocator
| |
| typeName | back to summary |
|---|---|
| private final QName typeName | |
| CEnumLeafInfo | back to summary |
|---|---|
| public CEnumLeafInfo(Model model, QName typeName, CClassInfoParent container, String shortName, CNonElement base, Collection<CEnumConstant> _members, XSComponent source, CCustomizations customizations, Locator _sourceLocator) | |
| asElement | back to summary |
|---|---|
| public Element Implements org. Doc from org. Returns the
| |
| canBeReferencedByIDREF | back to summary |
|---|---|
| public boolean canBeReferencedByIDREF() Implements org. Doc from org. Deprecated why are you calling the method whose return value is known? True if this type is a valid target from a property annotated with
| |
| createConstant | back to summary |
|---|---|
| public JExpression createConstant(Outline outline, XmlString literal) Implements com. Doc from com. Creates a constant for the given lexical value.
For example, to create a constant 1 for CBuiltinLeafInfo.INT.createConstant( codeModel, "1", null ); This method is invoked at the backend as a part of the code generation process.
| |
| fullName | back to summary |
|---|---|
| public String fullName() Implements com. Doc from com. Human readable name of this type.
| |
| getAdapterUse | back to summary |
|---|---|
| public CAdapter getAdapterUse() Implements com. Doc from com. Deprecated
Guaranteed to return null.
| |
| getBaseType | back to summary |
|---|---|
| public NonElement Implements org. Doc from org. Returns the base type of the enumeration.
For example, with the following enum class, this method
returns
&XmlEnum(Integer.class)
enum Foo {
&XmlEnumValue("1")
ONE,
&XmlEnumValue("2")
TWO
}
| |
| getClazz | back to summary |
|---|---|
| public NClass getClazz() Implements org. Doc from org. The same as
| |
| getConstants | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Returns the read-only list of enumeration constants.
| |
| getCustomizations | back to summary |
|---|---|
| public CCustomizations getCustomizations() Implements com. Doc from com. Gets the list of customizations attached to this model component.
| |
| getElementName | back to summary |
|---|---|
| public QName getElementName() Implements org. Doc from org. Gets the element name of the class, if the class is bound to an element.
| |
| getExpectedMimeType | back to summary |
|---|---|
| public MimeType getExpectedMimeType() Implements com. Doc from com. A can have an associated MIME type.
| |
| getInfo | back to summary |
|---|---|
| public CNonElement getInfo() Implements com. Doc from com. Deprecated
Guaranteed to return this.
| |
| getLocation | back to summary |
|---|---|
| public Location getLocation() Implements org. Doc from org. Gets the location object that this object points to. This operation could be inefficient and costly.
| |
| getLocator | back to summary |
|---|---|
| public Locator getLocator() Implements com. Source line information that points to the place where this type-safe enum is defined. Used to report error messages.
| |
| getSchemaComponent | back to summary |
|---|---|
| public XSComponent getSchemaComponent() Implements com. Doc from com. If this model object is built from XML Schema, this property returns a schema component from which the model is built.
| |
| getType | back to summary |
|---|---|
| public NType getType() Implements org. Doc from org. Gets the underlying Java type that object represents.
| |
| getTypeName | back to summary |
|---|---|
| public QName getTypeName() Implements org. Doc from org. Gets the primary XML type ANYTYPE_NAME of the class. A Java type can be mapped to multiple XML types, but one of them is considered "primary" and used when we generate a schema.
| |
| getUpstream | back to summary |
|---|---|
| public Locatable getUpstream() Implements org. Doc from org. Gets the upstream
| |
| idUse | back to summary |
|---|---|
| public ID idUse() Implements com. Doc from com. Whether the referenced type (individual item type in case of collection) is ID/IDREF. ID is a property of a relationship. When a bean Foo has an ID property called 'bar' whose type is String, Foo isn't an ID, String isn't an ID, but this relationship is an ID (in the sense that Foo uses this String as an ID.) The same thing can be said with IDREF. When Foo refers to Bar by means of IDREF, neither Foo nor Bar is IDREF. That's why we have this method in .
| |
| isAbstract | back to summary |
|---|---|
| public boolean isAbstract() Implements com.
| |
| isBoxedType | back to summary |
|---|---|
| public boolean isBoxedType() Implements com. Doc from com. Returns true iff this type represents a class that has a unboxed form.
For example, for
| |
| isCollection | back to summary |
|---|---|
| public boolean isCollection() Implements com. Doc from com. Deprecated
Guaranteed to return false.
| |
| isElement | back to summary |
|---|---|
| public boolean isElement() Implements org. Doc from org. If the class is bound to an element, return true. Note that when this is true, the class is bound to both an element and a type.
| |
| isPrimitive | back to summary |
|---|---|
| public boolean isPrimitive() | |
| isSimpleType | back to summary |
|---|---|
| public boolean isSimpleType() Implements org. Doc from org. Returns true if this maps to text in XML, without any attribute nor child elements.
| |
| needsValueField | back to summary |
|---|---|
| public boolean needsValueField() The spec says the value field in the enum class will be generated only under certain circumstances.
| |
| toType | back to summary |
|---|---|
| public JClass toType(Outline o, Aspect aspect) Implements com. Doc from com. Returns the representation of this type in code model.
This operation requires the whole model to be built,
and hence it takes Under some code generation strategy, some bean classes are considered implementation specific (such as impl.FooImpl class) These classes always have accompanying "exposed" type (such as the Foo interface). For such Jekyll and Hyde type, the aspect parameter determines which personality is returned.
| |