Enum Class EnumSelector
- All Implemented Interfaces:
Serializable
,Comparable<EnumSelector>
,Constable
Identifies a property of an enumeration that should be used by
EnumOptions
to identify an input value.
When parsing a given input, values will be compared against one of the properties and if there's a match, the
corresponding enumeration value will be used to set the field of an annotated class.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMatches the value of a field of the annotated enumerationMatches the value of a method of the annotated enumerationMatches the result ofEnum.name()
Matches the result ofEnum.ordinal()
Matches the result ofEnum.toString()
()} -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumSelector
Returns the enum constant of this class with the specified name.static EnumSelector[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ORDINAL
Matches the result ofEnum.ordinal()
-
NAME
Matches the result ofEnum.name()
-
STRING
Matches the result ofEnum.toString()
()} -
CUSTOM_FIELD
Matches the value of a field of the annotated enumeration -
CUSTOM_METHOD
Matches the value of a method of the annotated enumeration
-
-
Constructor Details
-
EnumSelector
private EnumSelector()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-