Converter

A helper class for presenting values for IntegerSlotsEnum and BitFields in alternative ways, for example as decimal numbers.

To use it this way, add an annotation like this to the slot or bit field:

@EnumField(
describedBy = Converter.class,
lookupMethodName = "decimal")

Author

Mark van Gulik

Parameters

string

The String to present.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val fieldName: String

Answer the name of this enumeration value.

Link copied to clipboard
open override val fieldOrdinal: Int

Answer an integer that identifies this enumeration value uniquely within this enumeration subclass (i.e., any enumeration class implementing this interface). These values are allocated sequentially to the enumeration values, starting at zero.

Link copied to clipboard

The String to present for this field.