T - The argument type@Internal public class DefaultArgument<T> extends java.lang.Object implements Argument<T>, ArgumentCoercible<T>
| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<java.lang.Class<?>> |
CONTAINER_TYPES |
static java.util.Set<java.lang.String> |
PROVIDER_TYPES |
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LIST_OF_STRING, LONG, OBJECT_ARGUMENT, SHORT, STRING, VOID, VOID_OBJECT, ZERO_ARGUMENTSEMPTY| Modifier | Constructor and Description |
|---|---|
|
DefaultArgument(java.lang.Class<T> type,
AnnotationMetadata annotationMetadata,
Argument<?>... genericTypes) |
|
DefaultArgument(java.lang.Class<T> type,
java.lang.String name,
AnnotationMetadata annotationMetadata,
Argument<?>... genericTypes) |
|
DefaultArgument(java.lang.Class<T> type,
java.lang.String name,
AnnotationMetadata annotationMetadata,
boolean isTypeVariable,
Argument<?>... genericTypes) |
|
DefaultArgument(java.lang.Class<T> type,
java.lang.String name,
AnnotationMetadata annotationMetadata,
java.util.Map<java.lang.String,Argument<?>> typeParameters,
Argument<?>[] typeParameterArray) |
protected |
DefaultArgument(java.lang.Class<T> type,
java.lang.String name,
AnnotationMetadata annotationMetadata,
java.util.Map<java.lang.String,Argument<?>> typeParameters,
Argument<?>[] typeParameterArray,
boolean isTypeVariable) |
|
DefaultArgument(java.lang.reflect.Type type,
java.lang.String name,
AnnotationMetadata annotationMetadata) |
| Modifier and Type | Method and Description |
|---|---|
Argument<T> |
asArgument() |
boolean |
equals(java.lang.Object o) |
boolean |
equalsType(Argument<?> o)
Whether the types are equivalent.
|
AnnotationMetadata |
getAnnotationMetadata()
Supplies the metadata.
|
java.util.Optional<Argument<?>> |
getFirstTypeVariable() |
java.lang.String |
getName() |
java.lang.Class<T> |
getType() |
Argument[] |
getTypeParameters() |
java.util.Map<java.lang.String,Argument<?>> |
getTypeVariables() |
int |
hashCode() |
boolean |
isTypeVariable()
Whether this argument is a type variable used in generics.
|
java.lang.String |
toString() |
int |
typeHashCode()
The hash code including only the types.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisAssignableFrom, isAssignableFrom, isInstance, listOf, listOf, mapOf, mapOf, of, of, of, of, of, of, of, of, of, ofTypeVariable, ofTypeVariable, ofTypeVariable, ofTypeVariable, setOf, setOf, toClassArray, toStringasParameterizedType, getSimpleName, getTypeName, getTypeString, getWrappedType, getWrapperType, hasTypeVariables, isArray, isAsync, isAsyncOrReactive, isCompletable, isContainerType, isOptional, isPrimitive, isProvider, isReactive, isSpecifiedSingle, isVoid, isWrapperTypegetTypeVariableisDeclaredNonNull, isDeclaredNullable, isNonNull, isNullablefindAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypegetAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredpublic static final java.util.Set<java.lang.Class<?>> CONTAINER_TYPES
public static final java.util.Set<java.lang.String> PROVIDER_TYPES
public DefaultArgument(java.lang.Class<T> type, java.lang.String name, AnnotationMetadata annotationMetadata, Argument<?>... genericTypes)
type - The typename - The nameannotationMetadata - The annotation metadatagenericTypes - The generic typespublic DefaultArgument(java.lang.Class<T> type, AnnotationMetadata annotationMetadata, Argument<?>... genericTypes)
type - The typeannotationMetadata - The annotation metadatagenericTypes - The generic typespublic DefaultArgument(java.lang.Class<T> type, java.lang.String name, AnnotationMetadata annotationMetadata, java.util.Map<java.lang.String,Argument<?>> typeParameters, Argument<?>[] typeParameterArray)
type - The typename - The nameannotationMetadata - The annotation metadatatypeParameters - The map of parameterstypeParameterArray - The array of argumentspublic DefaultArgument(java.lang.Class<T> type, java.lang.String name, AnnotationMetadata annotationMetadata, boolean isTypeVariable, Argument<?>... genericTypes)
type - The typename - The nameannotationMetadata - The annotation metadataisTypeVariable - Is this argument a type variablegenericTypes - The generic typesprotected DefaultArgument(java.lang.Class<T> type, java.lang.String name, AnnotationMetadata annotationMetadata, java.util.Map<java.lang.String,Argument<?>> typeParameters, Argument<?>[] typeParameterArray, boolean isTypeVariable)
type - The typename - The nameannotationMetadata - The annotation metadatatypeParameters - The map of parameterstypeParameterArray - The array of argumentsisTypeVariable - Is the argument a type variablepublic DefaultArgument(java.lang.reflect.Type type,
java.lang.String name,
AnnotationMetadata annotationMetadata)
type - The typename - The nameannotationMetadata - The annotation metadatapublic boolean isTypeVariable()
ArgumentisTypeVariable in interface Argument<T>public AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProviderAnnotationMetadata.EMPTY_METADATA.getAnnotationMetadata in interface AnnotationMetadataProviderAnnotationMetadatapublic java.util.Optional<Argument<?>> getFirstTypeVariable()
getFirstTypeVariable in interface TypeVariableResolverpublic Argument[] getTypeParameters()
getTypeParameters in interface TypeVariableResolverpublic java.util.Map<java.lang.String,Argument<?>> getTypeVariables()
getTypeVariables in interface TypeVariableResolver@NonNull public java.lang.Class<T> getType()
getType in interface TypeInformation<T>@NonNull public java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equalsType(@Nullable Argument<?> o)
ArgumentObject.equals(Object) implementation includes the argument
name within the comparison so this method offers a variation that just compares types.equalsType in interface Argument<T>o - The type typepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int typeHashCode()
ArgumentObject.hashCode() implementation includes the
argument name within the comparison so this method offers a variation that just compares types.typeHashCode in interface Argument<T>public int hashCode()
hashCode in class java.lang.Object@NonNull public Argument<T> asArgument()
asArgument in interface ArgumentCoercible<T>