T - Type of enumpublic class CaseInsensitiveEnumNameArgumentType<T extends Enum<T>> extends CaseInsensitiveEnumArgumentType<T>
ArgumentType subclass for enum type using case-insensitive matching of values.
Uses Enum.name() as the String representation of the enum.
type_| Constructor and Description |
|---|
CaseInsensitiveEnumNameArgumentType(Class<T> type) |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Enum<T>> |
forEnum(Class<T> type)
Creates a
CaseInsensitiveEnumNameArgumentType for the given enum
type. |
protected Object[] |
getStringRepresentations()
Get the objects to be used to generate the String representations of all
enum constants.
|
protected String |
toStringRepresentation(T t)
Convert the given enum value to its string representation.
|
convert, inferMetavarpublic static <T extends Enum<T>> CaseInsensitiveEnumNameArgumentType<T> forEnum(Class<T> type)
Creates a CaseInsensitiveEnumNameArgumentType for the given enum
type.
type - type of the enum the CaseInsensitiveEnumNameArgumentType
should convert toCaseInsensitiveEnumNameArgumentType that converts
Strings to typeprotected String toStringRepresentation(T t)
CaseInsensitiveEnumArgumentTypeConvert the given enum value to its string representation.
toStringRepresentation in class CaseInsensitiveEnumArgumentType<T extends Enum<T>>t - the enum value to convert.t.protected Object[] getStringRepresentations()
CaseInsensitiveEnumArgumentType
Get the objects to be used to generate the String representations of all
enum constants. Object.toString() will be invoked on these
objects to obtain the actual String representation.
getStringRepresentations in class CaseInsensitiveEnumArgumentType<T extends Enum<T>>Copyright © 2012–2017. All rights reserved.