Module com.sun.xml.bind.core
Interface EnumConstant<T,C>
-
public interface EnumConstant<T,C>Individual constant of an enumeration.Javadoc in this class uses the following sample to explain the semantics:
@XmlEnum(Integer.class) enum Foo { @XmlEnumValue("1") ONE, @XmlEnumValue("2") TWO }- Author:
- Kohsuke Kawaguchi
- See Also:
EnumLeafInfo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EnumLeafInfo<T,C>getEnclosingClass()Gets theEnumLeafInfoto which this constant belongs to.StringgetLexicalValue()Lexical value of this constant.StringgetName()Gets the constant name.
-
-
-
Method Detail
-
getEnclosingClass
EnumLeafInfo<T,C> getEnclosingClass()
Gets theEnumLeafInfoto which this constant belongs to.- Returns:
- never null.
-
getLexicalValue
String getLexicalValue()
Lexical value of this constant.This value should be evaluated against
EnumLeafInfo.getBaseType()to obtain the typed value.This is the same value as written in the
XmlEnumValueannotation. In the above example, this method returns "1" and "2".- Returns:
- never null.
-
getName
String getName()
Gets the constant name.In the above example this method return "ONE" and "TWO".
- Returns:
- never null. A valid Java identifier.
-
-