public abstract static class GenericTypeDescription.ForParameterizedType extends Object implements GenericTypeDescription
| Modifier and Type | Class and Description |
|---|---|
static class |
GenericTypeDescription.ForParameterizedType.Latent
A latent description of a parameterized type.
|
static class |
GenericTypeDescription.ForParameterizedType.OfLoadedType
Description of a loaded parameterized 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 |
|---|
ForParameterizedType() |
| 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.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. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitasErasure, getOwnerType, getParametersforEach, spliteratorpublic GenericTypeDescription.Sort getSort()
GenericTypeDescriptiongetSort 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 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 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 TypeVariableSource getVariableSource()
GenericTypeDescriptionGenericTypeDescription.Sort.VARIABLE. For other types, this method
throws an IllegalStateException.getVariableSource 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 getTypeName()
GenericTypeDescriptionObject.toString() representations. For a non-generic
type, it is the fully qualified binary name of the type.getTypeName in interface GenericTypeDescriptionpublic String getSourceCodeName()
NamedElementgetSourceCodeName in interface NamedElementpublic boolean isPrimitive()
GenericTypeDescriptionisPrimitive in interface GenericTypeDescriptiontrue if this type description represents a primitive type.public boolean isArray()
GenericTypeDescriptionisArray in interface GenericTypeDescriptiontrue if this type description represents an array.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>public <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 GenericTypeDescriptionCopyright © 2014–2015. All rights reserved.