Class EnumeratedConverter

java.lang.Object
org.asnlab.asndt.runtime.conv.AsnConverter
org.asnlab.asndt.runtime.conv.EnumeratedConverter
Direct Known Subclasses:
EnumeratedValue.EnumeratedValueEnumeratedConverter, ReflectionEnumeratedConverter

public abstract class EnumeratedConverter extends AsnConverter
The EnumeratedConverter can convert Enumerated value object to ASN.1 recognized values and vice versa. This class is intent to be extended.
  • Field Details

  • Constructor Details

    • EnumeratedConverter

      public EnumeratedConverter()
  • Method Details

    • toValue

      public abstract int toValue(Object object)
      Return the enum value
      Parameters:
      object - The ENUMERATED value object
      Returns:
      The integer value associated with this ENUMERATED value
    • toObject

      public abstract Object toObject(int value)
      Return the enum object
      Parameters:
      value - The integer value associated with this ENUMERATED value
      Returns:
      The ENUMERATED value object
    • toOrdinal

      public abstract int toOrdinal(Object object)
      Return the enum ordinal (0 base)
      Parameters:
      object - The ENUMERATED value object
      Returns:
      The enum ordinal (0 base) of this ENUMERATED value
    • toEnum

      public abstract Object toEnum(int ordinal)
      Return the enum object
      Parameters:
      ordinal - The enum ordinal (0 base) of this ENUMERATED value
      Returns:
      The ENUMERATED value object