com.sun.xml.bind.v2.model.impl
Class EnumConstantImpl<T,C,F,M>

java.lang.Object
  extended by com.sun.xml.bind.v2.model.impl.EnumConstantImpl<T,C,F,M>
All Implemented Interfaces:
EnumConstant<T,C>
Direct Known Subclasses:
RuntimeEnumConstantImpl

 class EnumConstantImpl<T,C,F,M>
extends Object
implements EnumConstant<T,C>


Field Summary
protected  String lexical
           
protected  String name
           
protected  EnumConstantImpl<T,C,F,M> next
          All the constants of the EnumConstantImpl is linked in one list.
protected  EnumLeafInfoImpl<T,C,F,M> owner
           
 
Constructor Summary
EnumConstantImpl(EnumLeafInfoImpl<T,C,F,M> owner, String name, String lexical, EnumConstantImpl<T,C,F,M> next)
           
 
Method Summary
 EnumLeafInfo<T,C> getEnclosingClass()
          Gets the EnumLeafInfo to which this constant belongs to.
 String getLexicalValue()
          Lexical value of this constant.
 String getName()
          Gets the constant name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lexical

protected final String lexical

owner

protected final EnumLeafInfoImpl<T,C,F,M> owner

name

protected final String name

next

protected final EnumConstantImpl<T,C,F,M> next
All the constants of the EnumConstantImpl is linked in one list.

Constructor Detail

EnumConstantImpl

public EnumConstantImpl(EnumLeafInfoImpl<T,C,F,M> owner,
                        String name,
                        String lexical,
                        EnumConstantImpl<T,C,F,M> next)
Method Detail

getEnclosingClass

public EnumLeafInfo<T,C> getEnclosingClass()
Description copied from interface: EnumConstant
Gets the EnumLeafInfo to which this constant belongs to.

Specified by:
getEnclosingClass in interface EnumConstant<T,C>
Returns:
never null.

getLexicalValue

public final String getLexicalValue()
Description copied from interface: EnumConstant
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 XmlEnumValue annotation. In the above example, this method returns "1" and "2".

Specified by:
getLexicalValue in interface EnumConstant<T,C>
Returns:
never null.

getName

public final String getName()
Description copied from interface: EnumConstant
Gets the constant name.

In the above example this method return "ONE" and "TWO".

Specified by:
getName in interface EnumConstant<T,C>
Returns:
never null. A valid Java identifier.