org.pfsw.bif.enums
Interface IEnumType

All Superinterfaces:
IStringRepresentation
All Known Subinterfaces:
IFieldName, IStringConstant
All Known Implementing Classes:
JsonSyntaxElement

public interface IEnumType
extends IStringRepresentation

A general interface that allows to mark enum types and therefore use the interface rather than the enum directly. That allows to specify multiple enum implementations for the same purpose.

The methods declared here are automatically implemented by each enum type because they are implicitly inherited from class java.lang.Enum.


Method Summary
 java.lang.Class<?> getDeclaringClass()
          Returns the Class object corresponding to this enum constant's enum type.
 java.lang.String name()
          Returns the name of this enum constant, exactly as declared in its enum declaration.
 int ordinal()
          Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
 
Methods inherited from interface org.pfsw.bif.text.IStringRepresentation
asString
 

Method Detail

name

java.lang.String name()
Returns the name of this enum constant, exactly as declared in its enum declaration.


ordinal

int ordinal()
Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).


getDeclaringClass

java.lang.Class<?> getDeclaringClass()
Returns the Class object corresponding to this enum constant's enum type.