Top Description Methods
org.glassfish.jaxb.core.v2.model.core

public Interface EnumLeafInfo<T, C>

extends LeafInfo<T, C>
Known Direct Subinterfaces
org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeEnumLeafInfo
Known Direct Implementers
org.glassfish.jaxb.runtime.v2.model.impl.EnumLeafInfoImpl, com.sun.tools.xjc.model.CEnumLeafInfo

NonElement that represents an Enum class.
Author
Kohsuke Kawaguchi

Method Summary

Modifier and TypeMethod and Description
public NonElement<T, C>

Returns:

never null.
getBaseType
()

Returns the base type of the enumeration.

public C

Returns:

always non-null.
getClazz
()

The same as getType() but an is guaranteed to represent an enum declaration, which is a kind of a class declaration.

public Iterable<? extends EnumConstant<?, ?>>

Returns:

never null. Can be empty (really?).
getConstants
()

Returns the read-only list of enumeration constants.

Method Detail

getBaseTypeback to summary
public NonElement<T, C> getBaseType()

Returns the base type of the enumeration.

For example, with the following enum class, this method returns BuiltinLeafInfo for Integer.

&XmlEnum(Integer.class)
enum Foo {
  &XmlEnumValue("1")
  ONE,
  &XmlEnumValue("2")
  TWO
}
Returns:NonElement<T, C>

never null.

getClazzback to summary
public C getClazz()

The same as getType() but an is guaranteed to represent an enum declaration, which is a kind of a class declaration.

Returns:C

always non-null.

getConstantsback to summary
public Iterable<? extends EnumConstant<?, ?>> getConstants()

Returns the read-only list of enumeration constants.

Returns:Iterable<? extends EnumConstant<?, ?>>

never null. Can be empty (really?).