public static class TypeDescription.Generic.OfParameterizedType.ForGenerifiedErasure extends TypeDescription.Generic.OfParameterizedType
Modifier and Type | Class and Description |
---|---|
protected static class |
TypeDescription.Generic.OfParameterizedType.ForGenerifiedErasure.NonAnnotatedTypeVariableList
A type list of type variables that represents type variables as generic type arguments without type annotations.
|
TypeDescription.Generic.OfParameterizedType.ForGenerifiedErasure, TypeDescription.Generic.OfParameterizedType.ForLoadedType, TypeDescription.Generic.OfParameterizedType.Latent, TypeDescription.Generic.OfParameterizedType.RenderingDelegate
TypeDescription.Generic.AbstractBase, TypeDescription.Generic.AnnotationReader, TypeDescription.Generic.Builder, TypeDescription.Generic.LazyProjection, TypeDescription.Generic.OfGenericArray, TypeDescription.Generic.OfNonGenericType, TypeDescription.Generic.OfParameterizedType, TypeDescription.Generic.OfTypeVariable, TypeDescription.Generic.OfWildcardType, TypeDescription.Generic.Visitor<T>
TypeDefinition.Sort, TypeDefinition.SuperClassIterator
NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
ANNOTATION, OBJECT, UNDEFINED, VOID
EMPTY_NAME, NO_NAME
EMPTY_MASK
Modifier | Constructor and Description |
---|---|
protected |
ForGenerifiedErasure(TypeDescription typeDescription)
Creates a new parameterized type for a generified erasure.
|
Modifier and Type | Method and Description |
---|---|
TypeDescription |
asErasure()
Returns the erasure of this type.
|
AnnotationList |
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.
|
TypeDescription.Generic |
getOwnerType()
Returns the owner type of this type.
|
TypeList.Generic |
getTypeArguments()
Returns the type arguments of this type.
|
static TypeDescription.Generic |
of(TypeDescription typeDescription)
Resolves a type description to be represented as a generic type where any type with generic properties is
represented as a parameterized type and any type without such properties is represented as a non-generic
type.
|
accept, equals, getActualName, getComponentType, getDeclaredFields, getDeclaredMethods, getInterfaces, getLowerBounds, getSort, getStackSize, getSuperClass, getSymbol, getTypeName, getTypeVariableSource, getUpperBounds, hashCode, isArray, isPrimitive, iterator, represents, toString
asGenericType, asRawType, getModifiers
isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isAnnotation, isInterface
isAbstract
isEnum
isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
isFinal, isSynthetic
forEach, spliterator
protected ForGenerifiedErasure(TypeDescription typeDescription)
typeDescription
- The represented type erasure.public static TypeDescription.Generic of(TypeDescription typeDescription)
typeDescription
- The type erasure to represent.public TypeList.Generic getTypeArguments()
TypeDescription.Generic
Returns the type arguments of this type.
Parameters are only well-defined for parameterized types (Sort#PARAMETERIZED
).
For all other types, this method throws an IllegalStateException
.
public TypeDescription.Generic getOwnerType()
TypeDescription.Generic
Returns the owner type of this type. A type's owner type describes a nested type's declaring type.
If it exists, the returned type can be a non-generic or parameterized type. If a class has no
declaring type, null
is returned.
An owner type is only well-defined for parameterized types (Sort#PARAMETERIZED
),
for non-generic types (Sort#NON_GENERIC
) and for generic arrays (Sort#GENERIC_ARRAY
).
For all other types, this method throws an IllegalStateException
.
null
if no owner type exists.public AnnotationList getDeclaredAnnotations()
AnnotatedCodeElement
public TypeDescription asErasure()
TypeDefinition
TypeDescription.Generic.Sort#WILDCARD
)
do not have a well-defined erasure and cause an IllegalStateException
to be thrown.Copyright © 2014–2016. All rights reserved.