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