T - The argument typepublic interface Argument<T> extends TypeInformation<T>, AnnotatedElement, Type
| Modifier and Type | Field and Description |
|---|---|
static Argument<Boolean> |
BOOLEAN
Constant for boolean argument.
|
static Argument<Byte> |
BYTE
Constant for byte argument.
|
static Argument<Character> |
CHAR
Constant char argument.
|
static Argument<Double> |
DOUBLE
Constant for double argument.
|
static Argument<Float> |
FLOAT
Constant for float argument.
|
static Argument<Integer> |
INT
Constant for int argument.
|
static Argument<List<String>> |
LIST_OF_STRING
Constant for List
|
static Argument<Long> |
LONG
Constant for long argument.
|
static Argument<Object> |
OBJECT_ARGUMENT
Default Object argument.
|
static Argument<Short> |
SHORT
Constant short argument.
|
static Argument<String> |
STRING
Constant for string argument.
|
static Argument<Void> |
VOID
Constant for void argument.
|
static Argument<Void> |
VOID_OBJECT
Constant for Void object argument.
|
static Argument[] |
ZERO_ARGUMENTS
Constant representing zero arguments.
|
EMPTY| Modifier and Type | Method and Description |
|---|---|
boolean |
equalsType(Argument<?> other)
Whether the types are equivalent.
|
String |
getName() |
default boolean |
isAssignableFrom(Argument<?> candidateArgument)
Checks if the argument can be assigned to this argument.
|
default boolean |
isAssignableFrom(Class<?> candidateType)
Delegates to
Class.isAssignableFrom(Class) for this argument. |
default boolean |
isInstance(Object o)
Whether the given argument is an instance.
|
default boolean |
isTypeVariable()
Whether this argument is a type variable used in generics.
|
static <T> Argument<List<T>> |
listOf(Argument<T> type)
Creates a new argument representing a generic list.
|
static <T> Argument<List<T>> |
listOf(Class<T> type)
Creates a new argument representing a generic list.
|
static <K,V> Argument<Map<K,V>> |
mapOf(Argument<K> keyType,
Argument<V> valueType)
Creates a new argument representing a generic map.
|
static <K,V> Argument<Map<K,V>> |
mapOf(Class<K> keyType,
Class<V> valueType)
Creates a new argument representing a generic map.
|
static <T> Argument<T> |
of(Class<T> type)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(Class<T> type,
AnnotationMetadata annotationMetadata,
Argument<?>... typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(Class<T> type,
AnnotationMetadata annotationMetadata,
Class<?>[] typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(Class<T> type,
Argument<?>... typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(Class<T> type,
Class<?>... typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(Class<T> type,
String name)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(Class<T> type,
String name,
AnnotationMetadata annotationMetadata,
Argument<?>... typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(Class<T> type,
String name,
Argument<?>... typeParameters)
Creates a new argument for the given type and name.
|
static Argument<?> |
of(Type type)
|
static <T> Argument<T> |
ofTypeVariable(Class<T> type,
String name)
Creates a new argument for the given type and name that is a type variable.
|
static <T> Argument<T> |
ofTypeVariable(Class<T> type,
String name,
AnnotationMetadata annotationMetadata,
Argument<?>... typeParameters)
Creates a new argument for the given type and name that is a type variable.
|
static <T> Argument<T> |
ofTypeVariable(Class<T> type,
String argumentName,
String variableName)
Creates a new argument for the given type and name that is a type variable.
|
static <T> Argument<T> |
ofTypeVariable(Class<T> type,
String argumentName,
String variableName,
AnnotationMetadata annotationMetadata,
Argument<?>... typeParameters)
Creates a new argument for the given type and name that is a type variable.
|
static <T> Argument<Set<T>> |
setOf(Argument<T> type)
Creates a new argument representing a generic set.
|
static <T> Argument<Set<T>> |
setOf(Class<T> type)
Creates a new argument representing a generic set.
|
static Class<?>[] |
toClassArray(Argument<?>... arguments)
Convert an argument array to a class array.
|
static String |
toString(Argument<?>... arguments)
Convert the arguments to a string representation.
|
int |
typeHashCode()
The hash code including only the types.
|
asParameterizedType, getSimpleName, getType, getTypeName, getTypeString, getWrappedType, getWrapperType, hasTypeVariables, isArray, isAsync, isAsyncOrReactive, isCompletable, isContainerType, isOptional, isPrimitive, isProvider, isReactive, isSpecifiedSingle, isVoid, isWrapperTypegetFirstTypeVariable, getTypeParameters, getTypeVariable, getTypeVariablesisDeclaredNonNull, isDeclaredNullable, isNonNull, isNullablefindAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypegetAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredstatic final Argument<Integer> INT
static final Argument<Long> LONG
static final Argument<Float> FLOAT
static final Argument<Double> DOUBLE
static final Argument<Void> VOID
static final Argument<Byte> BYTE
static final Argument<Boolean> BOOLEAN
static final Argument<Character> CHAR
static final Argument<Short> SHORT
static final Argument[] ZERO_ARGUMENTS
static final Argument<Object> OBJECT_ARGUMENT
boolean equalsType(@Nullable Argument<?> other)
Object.equals(Object) implementation includes the argument
name within the comparison so this method offers a variation that just compares types.other - The type typeint typeHashCode()
Object.hashCode() implementation includes the
argument name within the comparison so this method offers a variation that just compares types.default boolean isTypeVariable()
default boolean isInstance(@Nullable Object o)
o - The objectdefault boolean isAssignableFrom(@NonNull Class<?> candidateType)
Class.isAssignableFrom(Class) for this argument.candidateType - The candidate typedefault boolean isAssignableFrom(@NonNull Argument<?> candidateArgument)
candidateArgument - The candidate argument@NonNull static Class<?>[] toClassArray(@Nullable Argument<?>... arguments)
arguments - The arguments@NonNull static String toString(@Nullable Argument<?>... arguments)
arguments - The arguments@NonNull static <T> Argument<T> of(@NonNull Class<T> type, @Nullable String name, @Nullable Argument<?>... typeParameters)
T - The generic typetype - The typename - The nametypeParameters - the type parameters@NonNull static <T> Argument<T> ofTypeVariable(@NonNull Class<T> type, @Nullable String name, @Nullable AnnotationMetadata annotationMetadata, @Nullable Argument<?>... typeParameters)
T - The generic typetype - The typename - The nameannotationMetadata - The annotation metadatatypeParameters - the type parameters@NonNull static <T> Argument<T> ofTypeVariable(@NonNull Class<T> type, @Nullable String argumentName, @NonNull String variableName, @Nullable AnnotationMetadata annotationMetadata, @Nullable Argument<?>... typeParameters)
T - The generic typetype - The typeargumentName - The name of the argumenntvariableName - The variable nameannotationMetadata - The annotation metadatatypeParameters - the type parameters@NonNull static <T> Argument<T> ofTypeVariable(@NonNull Class<T> type, @Nullable String name)
T - The generic typetype - The typename - The name@NonNull static <T> Argument<T> ofTypeVariable(@NonNull Class<T> type, @Nullable String argumentName, @NonNull String variableName)
T - The generic typetype - The typeargumentName - The name of the argumentvariableName - The variable name@NonNull static <T> Argument<T> of(@NonNull Class<T> type, @Nullable String name, @Nullable AnnotationMetadata annotationMetadata, @Nullable Argument<?>... typeParameters)
T - The generic typetype - The typename - The nameannotationMetadata - the annotation metadatatypeParameters - the type parameters@NonNull static <T> Argument<T> of(@NonNull Class<T> type, @Nullable AnnotationMetadata annotationMetadata, @Nullable Argument<?>... typeParameters)
T - The generic typetype - The typeannotationMetadata - the annotation metadatatypeParameters - the type parameters@NonNull static <T> Argument<T> of(@NonNull Class<T> type, @Nullable String name)
T - The generic typetype - The typename - The name@NonNull static <T> Argument<T> of(@NonNull Class<T> type, @Nullable Argument<?>... typeParameters)
T - The generic typetype - The typetypeParameters - The parameters type@NonNull static Argument<?> of(@NonNull Type type)
type - The typeIllegalArgumentException - If the type cannot be coerced@NonNull static <T> Argument<T> of(@NonNull Class<T> type)
T - The generic typetype - The type@NonNull static <T> Argument<T> of(@NonNull Class<T> type, @Nullable Class<?>... typeParameters)
T - The generic typetype - The typetypeParameters - the parameters type@NonNull static <T> Argument<T> of(@NonNull Class<T> type, @Nullable AnnotationMetadata annotationMetadata, @Nullable Class<?>[] typeParameters)
T - The generic typetype - The typeannotationMetadata - The annotation metadatatypeParameters - The parameters type@NonNull static <T> Argument<List<T>> listOf(@NonNull Class<T> type)
T - list element typetype - list element type@NonNull static <T> Argument<List<T>> listOf(@NonNull Argument<T> type)
T - list element typetype - list element type@NonNull static <T> Argument<Set<T>> setOf(@NonNull Class<T> type)
T - set element typetype - set element type@NonNull static <T> Argument<Set<T>> setOf(@NonNull Argument<T> type)
T - set element typetype - set element type@NonNull static <K,V> Argument<Map<K,V>> mapOf(@NonNull Class<K> keyType, @NonNull Class<V> valueType)
K - The map key typeV - The map value typekeyType - The key typevalueType - The value type@NonNull static <K,V> Argument<Map<K,V>> mapOf(@NonNull Argument<K> keyType, @NonNull Argument<V> valueType)
K - The map key typeV - The map value typekeyType - The key typevalueType - The value type