EnumLeafInfo implementation.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv NonElement | |
| pack-priv final C | clazz
The enum class whose information this object represents. |
| private QName | elementName
If this enum is also bound to an element, that tag name. |
| private EnumConstantImpl | firstConstant
All the |
| protected boolean | tokenStringType
Used to recognize token vs string. |
| private final T | |
| private final QName | typeName
Can be null for anonymous types. |
| Access | Constructor and Description |
|---|---|
| public | EnumLeafInfoImpl(ModelBuilder<T, C, F, M> builder, Locatable upstream, C clazz, T
clazz and type should both point to the enum class
that this type)EnumLeafInfo represents.
Because of the type parameterization we have to take them separately.
|
| Modifier and Type | Method and Description |
|---|---|
| public Element | |
| protected void | |
| public final boolean | canBeReferencedByIDREF()
Implements org.
Deprecated
why are you calling a method whose return value is always known?
Leaf-type cannot be referenced from IDREF. |
| protected EnumConstantImpl | |
| public NonElement | getBaseType()
Implements org. Returns the base type of the enumeration. |
| public C | getClazz()
Implements org. The same as |
| public Iterable | getConstants()
Implements org. Returns the read-only list of enumeration constants. |
| public QName | getElementName()
Implements org. Gets the element name of the class. |
| public Location | getLocation()
Implements org. Gets the location object that this object points to. |
| public ClassInfo | getScope()
Implements org.
Deprecated
you shouldn't be invoking this method on
ClassInfoImpl.
When a bean binds to an element, it's always through |
| public Element | getSubstitutionHead()
Implements org.
Deprecated
if you are invoking this method directly, there's something wrong.
No substitution. |
| public T | 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 boolean | isElement()
Implements org. If the class is bound to an element, return true. |
| public boolean | isSimpleType()
Implements org. Returns true if this maps to text in XML, without any attribute nor child elements. |
| public boolean | |
| public Iterator | |
| public void |
| baseType | back to summary |
|---|---|
| pack-priv NonElement<T, C> baseType | |
| clazz | back to summary |
|---|---|
| pack-priv final C clazz The enum class whose information this object represents. | |
| elementName | back to summary |
|---|---|
| private QName elementName If this enum is also bound to an element, that tag name. Or else null. | |
| firstConstant | back to summary |
|---|---|
| private EnumConstantImpl<T, C, F, M> firstConstant All the | |
| tokenStringType | back to summary |
|---|---|
| protected boolean tokenStringType Used to recognize token vs string. | |
| type | back to summary |
|---|---|
| private final T type | |
| typeName | back to summary |
|---|---|
| private final QName typeName Can be null for anonymous types. | |
| EnumLeafInfoImpl | back to summary |
|---|---|
public EnumLeafInfoImpl(ModelBuilder<T, C, F, M> builder, Locatable upstream, C clazz, T type)
| |
| asElement | back to summary |
|---|---|
| public Element Implements org. Doc from org. Returns the
| |
| calcConstants | back to summary |
|---|---|
| protected void calcConstants() Build | |
| canBeReferencedByIDREF | back to summary |
|---|---|
| public final boolean canBeReferencedByIDREF() Implements org. Deprecated why are you calling a method whose return value is always known? Leaf-type cannot be referenced from IDREF.
| |
| createEnumConstant | back to summary |
|---|---|
| protected EnumConstantImpl | |
| 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 C getClazz() Implements org. Doc from org. The same as
| |
| getConstants | back to summary |
|---|---|
| public Iterable Implements org. Doc from org. Returns the read-only list of enumeration constants.
| |
| getElementName | back to summary |
|---|---|
| public QName getElementName() Implements org. Doc from org. Gets the element name of the class.
| |
| 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.
| |
| getScope | back to summary |
|---|---|
| public ClassInfo Implements org. Deprecated you shouldn't be invoking this method on When a bean binds to an element, it's always through
| |
| getSubstitutionHead | back to summary |
|---|---|
| public Element Implements org. Deprecated if you are invoking this method directly, there's something wrong. No substitution.
| |
| getType | back to summary |
|---|---|
| public T 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.
| |
| 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.
| |
| 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.
| |
| isToken | back to summary |
|---|---|
public boolean isToken()
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type
| |
| link | back to summary |
|---|---|
| public void link() Overrides org.
| |