Package com.sun.xml.bind.v2.model.core
Interface EnumLeafInfo<T,C>
-
- All Superinterfaces:
LeafInfo<T,C>
,Locatable
,MaybeElement<T,C>
,NonElement<T,C>
,TypeInfo<T,C>
- All Known Subinterfaces:
RuntimeEnumLeafInfo
- All Known Implementing Classes:
CEnumLeafInfo
public interface EnumLeafInfo<T,C> extends LeafInfo<T,C>
NonElement
that represents anEnum
class.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
-
Fields inherited from interface com.sun.xml.bind.v2.model.core.NonElement
ANYTYPE_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NonElement<T,C>
getBaseType()
Returns the base type of the enumeration.C
getClazz()
The same asTypeInfo.getType()
but anEnumLeafInfo
is guaranteed to represent an enum declaration, which is a kind of a class declaration.Iterable<? extends EnumConstant>
getConstants()
Returns the read-only list of enumeration constants.-
Methods inherited from interface com.sun.xml.bind.v2.model.annotation.Locatable
getLocation, getUpstream
-
Methods inherited from interface com.sun.xml.bind.v2.model.core.MaybeElement
asElement, getElementName, isElement
-
Methods inherited from interface com.sun.xml.bind.v2.model.core.NonElement
getTypeName, isSimpleType
-
Methods inherited from interface com.sun.xml.bind.v2.model.core.TypeInfo
canBeReferencedByIDREF, getType
-
-
-
-
Method Detail
-
getClazz
C getClazz()
The same asTypeInfo.getType()
but anEnumLeafInfo
is guaranteed to represent an enum declaration, which is a kind of a class declaration.- Returns:
- always non-null.
-
getBaseType
NonElement<T,C> getBaseType()
Returns the base type of the enumeration.For example, with the following enum class, this method returns
BuiltinLeafInfo
forInteger
.&XmlEnum(Integer.class) enum Foo { &XmlEnumValue("1") ONE, &XmlEnumValue("2") TWO }
- Returns:
- never null.
-
getConstants
Iterable<? extends EnumConstant> getConstants()
Returns the read-only list of enumeration constants.- Returns:
- never null. Can be empty (really?).
-
-