|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.bind.v2.model.impl.TypeInfoImpl<T,C,F,M>
com.sun.xml.bind.v2.model.impl.EnumLeafInfoImpl<T,C,F,M>
class EnumLeafInfoImpl<T,C,F,M>
EnumLeafInfo implementation.
| Field Summary | |
|---|---|
(package private) NonElement<T,C> |
baseType
|
(package private) C |
clazz
The enum class whose information this object represents. |
| Fields inherited from class com.sun.xml.bind.v2.model.impl.TypeInfoImpl |
|---|
builder, owner |
| Fields inherited from interface com.sun.xml.bind.v2.model.core.NonElement |
|---|
ANYTYPE_NAME |
| Constructor Summary | |
|---|---|
EnumLeafInfoImpl(ModelBuilder<T,C,F,M> builder,
Locatable upstream,
C clazz,
T type)
|
|
| Method Summary | |
|---|---|
Element<T,C> |
asElement()
Returns the Element aspect of this ClassInfo. |
protected void |
calcConstants()
Build EnumConstants and discover/report any error in it. |
boolean |
canBeReferencedByIDREF()
Deprecated. why are you calling a method whose return value is always known? |
protected EnumConstantImpl<T,C,F,M> |
createEnumConstant(java.lang.String name,
java.lang.String literal,
F constant,
EnumConstantImpl<T,C,F,M> last)
|
NonElement<T,C> |
getBaseType()
Returns the base type of the enumeration. |
C |
getClazz()
The same as TypeInfo.getType() but an EnumLeafInfo
is guaranteed to represent an enum declaration, which is a
kind of a class declaration. |
java.lang.Iterable<? extends EnumConstantImpl<T,C,F,M>> |
getConstants()
Returns the read-only list of enumeration constants. |
javax.xml.namespace.QName |
getElementName()
Gets the element name of the class, if the class is bound to an element. |
Location |
getLocation()
Gets the location object that this object points to. |
ClassInfo<T,C> |
getScope()
Deprecated. you shouldn't be invoking this method on ClassInfoImpl. |
Element<T,C> |
getSubstitutionHead()
Deprecated. if you are invoking this method directly, there's something wrong. |
T |
getType()
Gets the underlying Java type that object represents. |
javax.xml.namespace.QName |
getTypeName()
Gets the primary XML type ANYTYPE_NAME of the class. |
boolean |
isElement()
If the class is bound to an element, return true. |
boolean |
isSimpleType()
Returns true if this NonElement maps to text in XML,
without any attribute nor child elements. |
java.util.Iterator<EnumConstantImpl<T,C,F,M>> |
iterator()
|
void |
link()
|
| Methods inherited from class com.sun.xml.bind.v2.model.impl.TypeInfoImpl |
|---|
getUpstream, nav, parseElementName, parseTypeName, parseTypeName, reader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.xml.bind.v2.model.annotation.Locatable |
|---|
getUpstream |
| Field Detail |
|---|
final C clazz
NonElement<T,C> baseType
| Constructor Detail |
|---|
public EnumLeafInfoImpl(ModelBuilder<T,C,F,M> builder,
Locatable upstream,
C clazz,
T type)
clazz - type - clazz and type should both point to the enum class
that this EnumLeafInfo represents.
Because of the type parameterization we have to take them separately.| Method Detail |
|---|
protected void calcConstants()
EnumConstants and discover/report any error in it.
protected EnumConstantImpl<T,C,F,M> createEnumConstant(java.lang.String name,
java.lang.String literal,
F constant,
EnumConstantImpl<T,C,F,M> last)
public T getType()
TypeInfo
getType in interface TypeInfo<T,C>public final boolean canBeReferencedByIDREF()
canBeReferencedByIDREF in interface TypeInfo<T,C>public javax.xml.namespace.QName getTypeName()
NonElementA Java type can be mapped to multiple XML types, but one of them is considered "primary" and used when we generate a schema.
getTypeName in interface NonElement<T,C>public C getClazz()
EnumLeafInfoTypeInfo.getType() but an EnumLeafInfo
is guaranteed to represent an enum declaration, which is a
kind of a class declaration.
getClazz in interface EnumLeafInfo<T,C>public NonElement<T,C> getBaseType()
EnumLeafInfo
For example, with the following enum class, this method
returns BuiltinLeafInfo for Integer.
&XmlEnum(Integer.class)
enum Foo {
&XmlEnumValue("1")
ONE,
&XmlEnumValue("2")
TWO
}
getBaseType in interface EnumLeafInfo<T,C>public boolean isSimpleType()
NonElementNonElement maps to text in XML,
without any attribute nor child elements.
isSimpleType in interface NonElement<T,C>public Location getLocation()
Locatable
getLocation in interface Locatablepublic java.lang.Iterable<? extends EnumConstantImpl<T,C,F,M>> getConstants()
EnumLeafInfo
getConstants in interface EnumLeafInfo<T,C>public void link()
link in class TypeInfoImpl<T,C,F,M>public Element<T,C> getSubstitutionHead()
getSubstitutionHead in interface Element<T,C>public javax.xml.namespace.QName getElementName()
MaybeElement
getElementName in interface Element<T,C>getElementName in interface MaybeElement<T,C>MaybeElement.isElement().public boolean isElement()
MaybeElementNote that when this is true, the class is bound to both an element and a type.
isElement in interface MaybeElement<T,C>public Element<T,C> asElement()
MaybeElementElement aspect of this ClassInfo.
asElement in interface MaybeElement<T,C>MaybeElement.isElement()==false, non-null if MaybeElement.isElement()==true.public ClassInfo<T,C> getScope()
ClassInfoImpl.
XmlRootElement,
so this method always return null.
getScope in interface Element<T,C>public java.util.Iterator<EnumConstantImpl<T,C,F,M>> iterator()
iterator in interface java.lang.Iterable<EnumConstantImpl<T,C,F,M>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||