T
- The argument typepublic interface Argument<T> extends TypeInformation<T>, AnnotatedElement, java.lang.reflect.Type
Modifier and Type | Field and Description |
---|---|
static Argument<java.lang.Boolean> |
BOOLEAN
Constant for boolean argument.
|
static Argument<java.lang.Byte> |
BYTE
Constant for byte argument.
|
static Argument<java.lang.Character> |
CHAR
Constant char argument.
|
static Argument<java.lang.Double> |
DOUBLE
Constant for double argument.
|
static Argument<java.lang.Float> |
FLOAT
Constant for float argument.
|
static Argument<java.lang.Integer> |
INT
Constant for int argument.
|
static Argument<java.util.List<java.lang.String>> |
LIST_OF_STRING
Constant for List
|
static Argument<java.lang.Long> |
LONG
Constant for long argument.
|
static Argument<java.lang.Object> |
OBJECT_ARGUMENT
Default Object argument.
|
static Argument<java.lang.Short> |
SHORT
Constant short argument.
|
static Argument<java.lang.String> |
STRING
Constant for string argument.
|
static Argument<java.lang.Void> |
VOID
Constant for void argument.
|
static Argument<java.lang.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.
|
java.lang.String |
getName() |
default boolean |
isInstance(java.lang.Object o)
Whether the given argument is an instance.
|
static <T> Argument<java.util.List<T>> |
listOf(Argument<T> type)
Creates a new argument representing a generic list.
|
static <T> Argument<java.util.List<T>> |
listOf(java.lang.Class<T> type)
Creates a new argument representing a generic list.
|
static <K,V> Argument<java.util.Map<K,V>> |
mapOf(Argument<K> keyType,
Argument<V> valueType)
Creates a new argument representing a generic map.
|
static <K,V> Argument<java.util.Map<K,V>> |
mapOf(java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Creates a new argument representing a generic map.
|
static <T> Argument<T> |
of(java.lang.Class<T> type)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(java.lang.Class<T> type,
AnnotationMetadata annotationMetadata,
Argument... typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(java.lang.Class<T> type,
Argument... typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(java.lang.Class<T> type,
java.lang.Class<?>... typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(java.lang.Class<T> type,
java.lang.String name)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(java.lang.Class<T> type,
java.lang.String name,
AnnotationMetadata annotationMetadata,
Argument... typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<T> |
of(java.lang.Class<T> type,
java.lang.String name,
Argument... typeParameters)
Creates a new argument for the given type and name.
|
static <T> Argument<java.util.Set<T>> |
setOf(Argument<T> type)
Creates a new argument representing a generic set.
|
static <T> Argument<java.util.Set<T>> |
setOf(java.lang.Class<T> type)
Creates a new argument representing a generic set.
|
static java.lang.Class[] |
toClassArray(Argument... arguments)
Convert an argument array to a class array.
|
static java.lang.String |
toString(Argument... arguments)
Convert the arguments to a string representation.
|
int |
typeHashCode()
The hash code including only the types.
|
asParameterizedType, getType, getTypeName, getTypeString, hasTypeVariables, isArray, isAsync, isAsyncOrReactive, isCompletable, isContainerType, isOptional, isReactive, isSpecifiedSingle, isVoid, isWrapperType
getFirstTypeVariable, getTypeParameters, getTypeVariable, getTypeVariables
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation
static final Argument<java.lang.String> STRING
static final Argument<java.lang.Integer> INT
static final Argument<java.lang.Long> LONG
static final Argument<java.lang.Float> FLOAT
static final Argument<java.lang.Double> DOUBLE
static final Argument<java.lang.Void> VOID
static final Argument<java.lang.Byte> BYTE
static final Argument<java.lang.Boolean> BOOLEAN
static final Argument<java.lang.Character> CHAR
static final Argument<java.lang.Short> SHORT
static final Argument[] ZERO_ARGUMENTS
static final Argument<java.lang.Object> OBJECT_ARGUMENT
static final Argument<java.util.List<java.lang.String>> LIST_OF_STRING
static final Argument<java.lang.Void> VOID_OBJECT
@NonNull java.lang.String getName()
boolean equalsType(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 isInstance(@Nullable java.lang.Object o)
o
- The object@NonNull static java.lang.Class[] toClassArray(Argument... arguments)
arguments
- The arguments@NonNull static java.lang.String toString(Argument... arguments)
arguments
- The arguments@NonNull static <T> Argument<T> of(java.lang.Class<T> type, java.lang.String name, @Nullable Argument... typeParameters)
T
- The generic typetype
- The typename
- The nametypeParameters
- the type parameters@NonNull static <T> Argument<T> of(java.lang.Class<T> type, java.lang.String name, 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(java.lang.Class<T> type, AnnotationMetadata annotationMetadata, @Nullable Argument... typeParameters)
T
- The generic typetype
- The typeannotationMetadata
- the annotation metadatatypeParameters
- the type parameters@NonNull static <T> Argument<T> of(java.lang.Class<T> type, java.lang.String name)
T
- The generic typetype
- The typename
- The name@NonNull static <T> Argument<T> of(java.lang.Class<T> type, @Nullable Argument... typeParameters)
T
- The generic typetype
- The typetypeParameters
- The parameters type@NonNull static <T> Argument<T> of(java.lang.Class<T> type)
T
- The generic typetype
- The type@NonNull static <T> Argument<T> of(java.lang.Class<T> type, @Nullable java.lang.Class<?>... typeParameters)
T
- The generic typetype
- The typetypeParameters
- the parameters type@NonNull static <T> Argument<java.util.List<T>> listOf(java.lang.Class<T> type)
T
- list element typetype
- list element type@NonNull static <T> Argument<java.util.List<T>> listOf(Argument<T> type)
T
- list element typetype
- list element type@NonNull static <T> Argument<java.util.Set<T>> setOf(java.lang.Class<T> type)
T
- set element typetype
- set element type@NonNull static <T> Argument<java.util.Set<T>> setOf(Argument<T> type)
T
- set element typetype
- set element type@NonNull static <K,V> Argument<java.util.Map<K,V>> mapOf(java.lang.Class<K> keyType, java.lang.Class<V> valueType)
K
- The map key typeV
- The map value typekeyType
- The key typevalueType
- The value type@NonNull static <K,V> Argument<java.util.Map<K,V>> mapOf(Argument<K> keyType, Argument<V> valueType)
K
- The map key typeV
- The map value typekeyType
- The key typevalueType
- The value type