-
- All Implemented Interfaces:
public final class QuiltArgumentsKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Enum<T>> T
valueEnumClassArg(ArgumentReader<?, TypedEnumArgumentDescriptor<T>> $self)
Reads the enum value of type T from the argument in the receiver ArgumentReader. final static String
valueEnumStringArg(ArgumentReader<?, StringEnumArgumentDescriptor> $self)
Reads the string value from the argument in the receiver ArgumentReader. final static <T extends Any> T
valueEnumMappedArg(ArgumentReader<?, MappedStringEnumArgumentDescriptor<T>> $self)
Reads the string value from the argument in the receiver ArgumentReader and converts it to a value of type T according to the map provided when creating the argument. final static <S extends Any, T extends Enum<T>> ArgumentConstructor<S, RequiredArgumentBuilder<S, ?>, TypedEnumArgumentDescriptor<T>>
enum(String name, KClass<T> type)
Creates an enum argument allowing all values of the specified enum type with name as the parameter name. final static <S extends Any> ArgumentConstructor<S, RequiredArgumentBuilder<S, ?>, StringEnumArgumentDescriptor>
enum(String name, List<String> values)
Creates a string argument allowing only values specified in values with name as the parameter name. final static <S extends Any, T extends Enum<T>> ArgumentConstructor<S, RequiredArgumentBuilder<S, ?>, MappedStringEnumArgumentDescriptor<T>>
enumAllowedSublist(String name, List<T> values)
Creates an enum argument allowing only values specified in values with name as the parameter name. final static <S extends Any, T extends Any> ArgumentConstructor<S, RequiredArgumentBuilder<S, ?>, MappedStringEnumArgumentDescriptor<T>>
enum(String name, Map<String, T> values)
Creates an enum argument allowing values specified by keys of values with name as the parameter name. -
-
Method Detail
-
valueEnumClassArg
final static <T extends Enum<T>> T valueEnumClassArg(ArgumentReader<?, TypedEnumArgumentDescriptor<T>> $self)
Reads the enum value of type T from the argument in the receiver ArgumentReader.
-
valueEnumStringArg
final static String valueEnumStringArg(ArgumentReader<?, StringEnumArgumentDescriptor> $self)
Reads the string value from the argument in the receiver ArgumentReader.
-
valueEnumMappedArg
final static <T extends Any> T valueEnumMappedArg(ArgumentReader<?, MappedStringEnumArgumentDescriptor<T>> $self)
Reads the string value from the argument in the receiver ArgumentReader and converts it to a value of type T according to the map provided when creating the argument.
-
enum
final static <S extends Any, T extends Enum<T>> ArgumentConstructor<S, RequiredArgumentBuilder<S, ?>, TypedEnumArgumentDescriptor<T>> enum(String name, KClass<T> type)
Creates an enum argument allowing all values of the specified enum type with name as the parameter name.
Enum values of T must have names that are distinct when case is ignored.
-
enum
final static <S extends Any> ArgumentConstructor<S, RequiredArgumentBuilder<S, ?>, StringEnumArgumentDescriptor> enum(String name, List<String> values)
Creates a string argument allowing only values specified in values with name as the parameter name.
All elements of values must be distinct when case is ignored.
-
enumAllowedSublist
final static <S extends Any, T extends Enum<T>> ArgumentConstructor<S, RequiredArgumentBuilder<S, ?>, MappedStringEnumArgumentDescriptor<T>> enumAllowedSublist(String name, List<T> values)
Creates an enum argument allowing only values specified in values with name as the parameter name.
All elements of values must have names that are distinct when case is ignored.
-
enum
final static <S extends Any, T extends Any> ArgumentConstructor<S, RequiredArgumentBuilder<S, ?>, MappedStringEnumArgumentDescriptor<T>> enum(String name, Map<String, T> values)
Creates an enum argument allowing values specified by keys of values with name as the parameter name.
When read, the argument will convert the provided string to its respective value in values.
Keys of values must be distinct when case is ignored.
-
-
-
-