public abstract static class TypeDescription.Generic.LazyProjection extends TypeDescription.Generic.AbstractBase
Modifier and Type | Class and Description |
---|---|
static class |
TypeDescription.Generic.LazyProjection.ForLoadedFieldType
A lazy projection of a field's type.
|
static class |
TypeDescription.Generic.LazyProjection.ForLoadedReturnType
A lazy projection of a method's generic return type.
|
static class |
TypeDescription.Generic.LazyProjection.ForLoadedSuperClass
A lazy projection of a generic super type.
|
static class |
TypeDescription.Generic.LazyProjection.OfConstructorParameter
A lazy projection of the parameter type of a
Constructor . |
static class |
TypeDescription.Generic.LazyProjection.OfMethodParameter
A lazy projection of the parameter type of a
Method . |
static class |
TypeDescription.Generic.LazyProjection.WithEagerNavigation
A lazy projection of a type that resolves super class and interface types eagerly.
|
static class |
TypeDescription.Generic.LazyProjection.WithLazyNavigation
A lazy projection of a type with a lazy resolution of super class and interface types.
|
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
Constructor and Description |
---|
LazyProjection() |
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(TypeDescription.Generic.Visitor<T> visitor)
Applies a visitor to this generic type description.
|
boolean |
equals(Object other) |
String |
getActualName()
Returns the name of this element as it is found in the source code.
|
TypeDescription.Generic |
getComponentType()
Returns the component type of this type.
|
FieldList<FieldDescription.InGenericShape> |
getDeclaredFields()
Returns the fields that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
getDeclaredMethods()
Returns the methods that this type declares.
|
TypeList.Generic |
getLowerBounds()
Returns the lower bounds of this type.
|
TypeDescription.Generic |
getOwnerType()
Returns the owner type of this type.
|
TypeDefinition.Sort |
getSort()
Returns the sort of the generic type this instance represents.
|
StackSize |
getStackSize()
Returns the size of the type described by this instance.
|
String |
getSymbol()
Returns the symbol of this type variable.
|
TypeList.Generic |
getTypeArguments()
Returns the type arguments of this type.
|
String |
getTypeName()
Returns the name of the type.
|
TypeVariableSource |
getTypeVariableSource()
Returns the source of this type variable.
|
TypeList.Generic |
getUpperBounds()
Returns the upper bounds of this type.
|
int |
hashCode() |
boolean |
isArray()
Checks if the type described by this entity is an array.
|
boolean |
isPrimitive()
Checks if the type described by this entity is a primitive type.
|
boolean |
represents(Type type)
Checks if the type described by this instance represents
type . |
protected abstract TypeDescription.Generic |
resolve()
Resolves the actual generic type.
|
String |
toString() |
asGenericType, asRawType, getModifiers
getEnumerationState, getFieldManifestation, getMethodManifestation, getMethodStrictness, getOwnership, getParameterManifestation, getProvisioningState, getSynchronizationState, getSyntheticState, getTypeManifestation, getVisibility, 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
asErasure, getInterfaces, getSuperClass
getTypeManifestation, isAnnotation, isInterface
isAbstract
getEnumerationState, isEnum
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getSyntheticState, isFinal, isSynthetic
forEach, iterator, spliterator
getDeclaredAnnotations
protected abstract TypeDescription.Generic resolve()
public TypeDefinition.Sort getSort()
TypeDefinition
public FieldList<FieldDescription.InGenericShape> getDeclaredFields()
TypeDefinition
TypeDefinition.Sort.NON_GENERIC
),
parameterized types (TypeDefinition.Sort.PARAMETERIZED
) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY
) types. Generic array
types never define fields and the returned list is always empty for such types.TypeDefinition.Sort.NON_GENERIC
),
parameterized types (TypeDefinition.Sort.PARAMETERIZED
) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY
) types. Generic array
types never define methods and the returned list is always empty for such types.public MethodList<MethodDescription.InGenericShape> getDeclaredMethods()
TypeDefinition
public TypeList.Generic getUpperBounds()
TypeDescription.Generic
Returns the upper bounds of this type. Any type with a well-defined upper bound is bound by at least one type. If no such
type is defined, the bound is implicitly Object
.
Only non-symbolic type variables (TypeDefinition.Sort.VARIABLE
, and wildcard types
(TypeDefinition.Sort.WILDCARD
) have well-defined upper bounds. For other
types, an IllegalStateException
is thrown.
public TypeList.Generic getLowerBounds()
TypeDescription.Generic
Returns the lower bounds of this type.
Only wildcard types (Sort#WILDCARD
) define a lower bound. For other
types, an IllegalStateException
is thrown.
public TypeDescription.Generic getComponentType()
TypeDefinition
Returns the component type of this type.
Only non-generic types (TypeDescription.Generic.Sort#NON_GENERIC
) and generic array types
TypeDescription.Generic.Sort#GENERIC_ARRAY
) define a component type. For other
types, an IllegalStateException
is thrown.
null
if this type does not represent an array type.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 TypeVariableSource getTypeVariableSource()
TypeDescription.Generic
Sort#VARIABLE
. For 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 String getTypeName()
TypeDefinition
Object.toString()
representations. For a non-generic
type, it is the fully qualified binary name of the type.public String getSymbol()
TypeDescription.Generic
Sort#VARIABLE
, Sort#VARIABLE_SYMBOLIC
). For other types, this method
throws an IllegalStateException
.public String getActualName()
NamedElement
public <T> T accept(TypeDescription.Generic.Visitor<T> visitor)
TypeDescription.Generic
T
- The value that this visitor yields.visitor
- The visitor to apply.public StackSize getStackSize()
TypeDefinition
TypeDescription.Generic.Sort#WILDCARD
do not have a well-defined a stack size and
cause an IllegalStateException
to be thrown.public boolean isArray()
TypeDefinition
true
if this type description represents an array.public boolean isPrimitive()
TypeDefinition
true
if this type description represents a primitive type.public boolean represents(Type type)
TypeDefinition
type
.represents
in interface TypeDefinition
represents
in class TypeDescription.Generic.AbstractBase
type
- The type of interest.true
if the type described by this instance represents type
.Copyright © 2014–2016. All rights reserved.