class ExplicitTypeVariable extends TypeVariable
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.TypeVariable<?> |
variable
The type parameter.
|
Constructor and Description |
---|
ExplicitTypeVariable(java.lang.reflect.TypeVariable<?> variable,
ParameterBound bound)
Create a
ExplicitTypeVariable for the given type parameter. |
Modifier and Type | Method and Description |
---|---|
TypeVariable |
createCopyWithBounds(ParameterBound lowerBound,
ParameterBound upperBound) |
boolean |
equals(@Nullable java.lang.Object obj) |
java.lang.String |
getBinaryName()
Returns the binary name of this type, including type arguments if this is a parameterized type
(so, it isn't really a binary name).
|
java.lang.String |
getFqName()
Returns the fully-qualified name of this type, including type arguments if this is a
parameterized type.
|
(package private) java.lang.reflect.TypeVariable<?> |
getReflectionTypeVariable() |
java.lang.String |
getSimpleName()
Returns the name of this type without type arguments or package qualifiers.
|
int |
hashCode() |
boolean |
isGeneric(boolean ignoreWildcards)
Indicate whether this type is generic.
|
ReferenceType |
substitute(Substitution substitution)
Applies a substitution to a
ReferenceType . |
canBeInstantiatedBy, forType, getRawtype, getTypeParameters, isAssignableFrom, isInstantiationOf, isSubtypeOf, isVariable, toString
getCanonicalName, getLowerTypeBound, getRuntimeClass, getUpperTypeBound, hasCaptureVariable, hasGenericBound, hasWildcard, setLowerBound, setUpperBound
applyCaptureConversion, forClass, getInstantiatingSubstitution, getInstantiatingSubstitutionforTypeVariable, isCaptureVariable, isReferenceType
compareTo, forFullyQualifiedName, forName, forValue, getTypeforFullyQualifiedName, getUnqualifiedBinaryName, isArray, isAssignableFromTypeOf, isBoxedPrimitive, isClass, isClassOrInterfaceType, isEnum, isGeneric, isInterface, isNonreceiverType, isObject, isParameterized, isPrimitive, isRawtype, isString, isVoid, runtimeClassIs
ExplicitTypeVariable(java.lang.reflect.TypeVariable<?> variable, ParameterBound bound)
ExplicitTypeVariable
for the given type parameter.variable
- the type parameterbound
- the upper bound on the parameterpublic boolean equals(@Nullable java.lang.Object obj)
Checks that the type parameter is equal. This may be more restrictive than desired because equivalent TypeVariable objects from different instances of the same type may be distinct.
equals
in class ParameterType
public int hashCode()
hashCode
in class ParameterType
public java.lang.String getFqName()
Type
java.util.List<T>
return "java.util.List<T>"
.public java.lang.String getBinaryName()
Type
java.util.List<T>
return "java.util.List<T>"
.getBinaryName
in class Type
public java.lang.String getSimpleName()
Type
java.util.List<T>
, returns "List"
.getSimpleName
in class Type
java.lang.reflect.TypeVariable<?> getReflectionTypeVariable()
public boolean isGeneric(boolean ignoreWildcards)
Type
public ReferenceType substitute(Substitution substitution)
ReferenceType
ReferenceType
. If the type is parameterized then replaces
type variables that occur, otherwise returns this type.
This abstract method forces typing of substitutions applied to ReferenceType
objects
without an explicit cast.
substitute
in class TypeVariable
substitution
- the type substitutionpublic TypeVariable createCopyWithBounds(ParameterBound lowerBound, ParameterBound upperBound)
createCopyWithBounds
in class TypeVariable