Class ReflectionEnumeratedConverter


public class ReflectionEnumeratedConverter extends EnumeratedConverter
  • Field Details

    • enumClass

      protected Class<?> enumClass
  • Constructor Details

    • ReflectionEnumeratedConverter

      public ReflectionEnumeratedConverter(Class<?> enumClass)
  • Method Details

    • toValue

      public int toValue(Object object)
      Description copied from class: EnumeratedConverter
      Return the enum value
      Specified by:
      toValue in class EnumeratedConverter
      Parameters:
      object - The ENUMERATED value object
      Returns:
      The integer value associated with this ENUMERATED value
    • toObject

      public Object toObject(int value)
      Description copied from class: EnumeratedConverter
      Return the enum object
      Specified by:
      toObject in class EnumeratedConverter
      Parameters:
      value - The integer value associated with this ENUMERATED value
      Returns:
      The ENUMERATED value object
    • toOrdinal

      public int toOrdinal(Object object)
      Description copied from class: EnumeratedConverter
      Return the enum ordinal (0 base)
      Specified by:
      toOrdinal in class EnumeratedConverter
      Parameters:
      object - The ENUMERATED value object
      Returns:
      The enum ordinal (0 base) of this ENUMERATED value
    • toEnum

      public Object toEnum(int ordinal)
      Description copied from class: EnumeratedConverter
      Return the enum object
      Specified by:
      toEnum in class EnumeratedConverter
      Parameters:
      ordinal - The enum ordinal (0 base) of this ENUMERATED value
      Returns:
      The ENUMERATED value object
    • isAnonymous

      public boolean isAnonymous()
      Overrides:
      isAnonymous in class AsnConverter