public abstract static class GenericTypeDescription.LazyProjection extends Object implements GenericTypeDescription
| Modifier and Type | Class and Description |
|---|---|
static class |
GenericTypeDescription.LazyProjection.OfLoadedFieldType
A lazy projection of a field's type.
|
static class |
GenericTypeDescription.LazyProjection.OfLoadedParameter
A lazy projection of a loaded parameter.
|
static class |
GenericTypeDescription.LazyProjection.OfLoadedReturnType
A lazy projection of a method's generic return type.
|
static class |
GenericTypeDescription.LazyProjection.OfLoadedSuperType
A lazy projection of a generic super type.
|
GenericTypeDescription.ForGenericArray, GenericTypeDescription.ForNonGenericType, GenericTypeDescription.ForParameterizedType, GenericTypeDescription.ForTypeVariable, GenericTypeDescription.ForWildcardType, GenericTypeDescription.LazyProjection, GenericTypeDescription.Sort, GenericTypeDescription.SuperTypeIterator, GenericTypeDescription.Visitor<T>NamedElement.WithGenericName, NamedElement.WithRuntimeNameEMPTY_NAME, NO_NAME| Constructor and Description |
|---|
LazyProjection() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(GenericTypeDescription.Visitor<T> visitor)
Applies a visitor to this generic type description.
|
boolean |
equals(Object other) |
GenericTypeDescription |
getComponentType()
Returns the component type of this type.
|
FieldList |
getDeclaredFields()
Returns a list of field descriptions that are declared by this type.
|
MethodList |
getDeclaredMethods()
Returns a list of method descriptions that are declared by this type.
|
GenericTypeList |
getInterfaces()
Returns the generic interface types of this type.
|
GenericTypeList |
getLowerBounds()
Returns the lower bounds of this type.
|
GenericTypeDescription |
getOwnerType()
Returns the owner type of this type.
|
GenericTypeList |
getParameters()
Returns the type parameters of this type.
|
GenericTypeDescription.Sort |
getSort()
Returns the sort of the generic type this instance represents.
|
String |
getSourceCodeName()
Returns the name of this element as it is found in the source code.
|
StackSize |
getStackSize()
Returns the size of the type described by this instance.
|
GenericTypeDescription |
getSuperType()
Returns the generic super type of this type.
|
String |
getSymbol()
Returns the symbol of this type variable.
|
String |
getTypeName()
Returns the name of the type.
|
GenericTypeList |
getUpperBounds()
Returns the upper bounds of this type.
|
TypeVariableSource |
getVariableSource()
Returns the source of this type variable.
|
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.
|
Iterator<GenericTypeDescription> |
iterator() |
boolean |
represents(Type type)
Checks if the type described by this instance represents
type. |
protected abstract GenericTypeDescription |
resolve()
Resolves the actual generic type.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitasErasureforEach, spliteratorprotected abstract GenericTypeDescription resolve()
public GenericTypeDescription.Sort getSort()
GenericTypeDescriptiongetSort in interface GenericTypeDescriptionpublic GenericTypeList getInterfaces()
GenericTypeDescriptionReturns the generic interface types of this type.
Only non-generic types (GenericTypeDescription.Sort.NON_GENERIC) and parameterized types
(GenericTypeDescription.Sort.PARAMETERIZED) define a super type. For a generic array type,
(GenericTypeDescription.Sort.GENERIC_ARRAY), a list of Serializable and
Cloneable) is returned. For other generic types, an IllegalStateException is thrown.
getInterfaces in interface GenericTypeDescriptionpublic GenericTypeDescription getSuperType()
GenericTypeDescriptionReturns the generic super type of this type.
Only non-generic types (GenericTypeDescription.Sort.NON_GENERIC) and parameterized types
(GenericTypeDescription.Sort.PARAMETERIZED) define a super type. For a generic array type,
(GenericTypeDescription.Sort.GENERIC_ARRAY), a description of Object is returned.
For other generic types, an IllegalStateException is thrown.
getSuperType in interface GenericTypeDescriptionnull if no such type exists.public FieldList getDeclaredFields()
GenericTypeDescriptionReturns a list of field descriptions that are declared by this type. For parameterized types, all type variables of these fields are resolved to the values of the type variables.
Only non-generic types (GenericTypeDescription.Sort.NON_GENERIC) and parameterized types
(GenericTypeDescription.Sort.PARAMETERIZED) define a super type. For a generic array type,
(GenericTypeDescription.Sort.GENERIC_ARRAY), an empty list is returned. For other generic
types, an IllegalStateException is thrown.
getDeclaredFields in interface GenericTypeDescriptionpublic MethodList getDeclaredMethods()
GenericTypeDescriptionReturns a list of method descriptions that are declared by this type. For parameterized types, all type variables used by these methods are resolved to the values of the type variables.
Only non-generic types (GenericTypeDescription.Sort.NON_GENERIC) and parameterized types
(GenericTypeDescription.Sort.PARAMETERIZED) define a super type. For a generic array type,
(GenericTypeDescription.Sort.GENERIC_ARRAY), an empty list is returned. For other
generic types, an IllegalStateException is thrown.
getDeclaredMethods in interface GenericTypeDescriptionpublic GenericTypeList getUpperBounds()
GenericTypeDescription
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 (GenericTypeDescription.Sort.VARIABLE,
GenericTypeDescription.Sort.VARIABLE_DETACHED) and wildcard types
(GenericTypeDescription.Sort.WILDCARD) have well-defined upper bounds. For other
types, an IllegalStateException is thrown.
getUpperBounds in interface GenericTypeDescriptionpublic GenericTypeList getLowerBounds()
GenericTypeDescriptionReturns the lower bounds of this type.
Only wildcard types (GenericTypeDescription.Sort.WILDCARD) define a lower bound. For other
types, an IllegalStateException is thrown.
getLowerBounds in interface GenericTypeDescriptionpublic GenericTypeDescription getComponentType()
GenericTypeDescriptionReturns the component type of this type.
Only non-generic types (GenericTypeDescription.Sort.NON_GENERIC) and generic array types
GenericTypeDescription.Sort.GENERIC_ARRAY) define a component type. For other
types, an IllegalStateException is thrown.
getComponentType in interface GenericTypeDescriptionnull if this type does not represent an array type.public GenericTypeList getParameters()
GenericTypeDescriptionReturns the type parameters of this type.
Parameters are only well-defined for parameterized types
(GenericTypeDescription.Sort.PARAMETERIZED), generic array types
(GenericTypeDescription.Sort.GENERIC_ARRAY) and non-generic types
(GenericTypeDescription.Sort.NON_GENERIC). For non-generic and generic array types,
the returned list is always empty. For all other types, this method throws an IllegalStateException.
getParameters in interface GenericTypeDescriptionpublic TypeVariableSource getVariableSource()
GenericTypeDescriptionGenericTypeDescription.Sort.VARIABLE. For other types, this method
throws an IllegalStateException.getVariableSource in interface GenericTypeDescriptionpublic GenericTypeDescription getOwnerType()
GenericTypeDescriptionReturns the owner type of this type.
An owner type is only well-defined for parameterized types
(GenericTypeDescription.Sort.PARAMETERIZED) , generic array types
(GenericTypeDescription.Sort.GENERIC_ARRAY) and non-generic types
(GenericTypeDescription.Sort.NON_GENERIC). Non-generic types and generic array types do
never have an owner type. For all other types, this method throws an IllegalStateException.
getOwnerType in interface GenericTypeDescriptionnull if no such owner type exists.public String getTypeName()
GenericTypeDescriptionObject.toString() representations. For a non-generic
type, it is the fully qualified binary name of the type.getTypeName in interface GenericTypeDescriptionpublic String getSymbol()
GenericTypeDescriptionGenericTypeDescription.Sort.VARIABLE,
GenericTypeDescription.Sort.VARIABLE_DETACHED,
GenericTypeDescription.Sort.VARIABLE_SYMBOLIC). For other types, this method
throws an IllegalStateException.getSymbol in interface GenericTypeDescriptionpublic String getSourceCodeName()
NamedElementgetSourceCodeName in interface NamedElementpublic <T> T accept(GenericTypeDescription.Visitor<T> visitor)
GenericTypeDescriptionaccept in interface GenericTypeDescriptionT - The value that this visitor yields.visitor - The visitor to apply.public StackSize getStackSize()
GenericTypeDescriptionGenericTypeDescription.Sort.WILDCARD do not have a well-defined a stack size and
cause an IllegalStateException to be thrown.getStackSize in interface GenericTypeDescriptionpublic boolean isArray()
GenericTypeDescriptionisArray in interface GenericTypeDescriptiontrue if this type description represents an array.public boolean isPrimitive()
GenericTypeDescriptionisPrimitive in interface GenericTypeDescriptiontrue if this type description represents a primitive type.public boolean represents(Type type)
GenericTypeDescriptiontype.represents in interface GenericTypeDescriptiontype - The type of interest.true if the type described by this instance represents type.public Iterator<GenericTypeDescription> iterator()
iterator in interface Iterable<GenericTypeDescription>Copyright © 2014–2015. All rights reserved.