public abstract class ParameterizedType extends ClassOrInterfaceType
C<T1,...,Tk> where
C<F1,...,Fk> is a generic class instantiated by a substitution [Fi:=Ti], and
Ti is a subtype of the upper bound Bi of the type parameter Fi.GenericClassType,
InstantiatedType| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.Class<?>,GenericClassType> |
cache
A cache of all ParameterizedTypes that have been created.
|
enclosingType| Constructor and Description |
|---|
ParameterizedType() |
| Modifier and Type | Method and Description |
|---|---|
static GenericClassType |
forClass(java.lang.Class<?> typeClass)
Creates a
GenericClassType for the given reflective Class object. |
static ParameterizedType |
forType(java.lang.reflect.Type type)
Performs the conversion of
java.lang.reflect.ParameterizedType to a ParameterizedType . |
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.
|
abstract GenericClassType |
getGenericClassType()
Returns the
GenericClassType for this parameterized type. |
java.lang.String |
getUnqualifiedBinaryName()
Returns the name of this type without package name, but with type arguments if parameterized,
and enclosing class if a member class.
|
abstract ParameterizedType |
substitute(Substitution substitution)
Applies a substitution to a
ReferenceType. |
applyCaptureConversion, applyCaptureConversion, equals, getAllSupertypesInclusive, getCanonicalName, getImmediateSupertypes, getInstantiatingSubstitution, getInterfaces, getMatchingSupertype, getPackage, getPackagePrefix, getRawtype, getSimpleName, getSuperclass, getSuperTypes, getTypeArguments, getTypeParameters, hasCaptureVariable, hashCode, hasWildcard, isAbstract, isClassOrInterfaceType, isGeneric, isInstantiationOf, isMemberClass, isNestedClass, isParameterized, isStatic, isSubtypeOf, substitutegetInstantiatingSubstitutionforTypeVariable, isAssignableFrom, isCaptureVariable, isReferenceTypecompareTo, forFullyQualifiedName, forName, forValue, getRuntimeClass, getTypeforFullyQualifiedName, isArray, isAssignableFromTypeOf, isBoxedPrimitive, isClass, isEnum, isGeneric, isInterface, isNonreceiverType, isObject, isPrimitive, isRawtype, isString, isVariable, isVoid, runtimeClassIs, toStringprivate static final java.util.Map<java.lang.Class<?>,GenericClassType> cache
public static GenericClassType forClass(java.lang.Class<?> typeClass)
GenericClassType for the given reflective Class object.typeClass - the class typepublic static ParameterizedType forType(java.lang.reflect.Type type)
java.lang.reflect.ParameterizedType to a ParameterizedType .type - the reflective type objectParameterizedTypepublic abstract ParameterizedType substitute(Substitution substitution)
ClassOrInterfaceTypeReferenceType. 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.
This abstract method allows substitutions to be applied to ClassOrInterfaceType
objects without casting.
substitute in class ClassOrInterfaceTypesubstitution - the type substitutionpublic abstract GenericClassType getGenericClassType()
GenericClassType for this parameterized type.public java.lang.String getFqName()
Typejava.util.List<T> return "java.util.List<T>".getFqName in class ClassOrInterfaceTypepublic java.lang.String getBinaryName()
Typejava.util.List<T> return "java.util.List<T>".getBinaryName in class ClassOrInterfaceTypepublic java.lang.String getUnqualifiedBinaryName()
Typejava.util.List<T> would return
"List<T>".getUnqualifiedBinaryName in class ClassOrInterfaceType