public abstract static class GenericTypeDescription.ForTypeVariable extends Object implements GenericTypeDescription
| Modifier and Type | Class and Description |
|---|---|
static class |
GenericTypeDescription.ForTypeVariable.InDetachedForm
An abstract implementation of a description of a type variable in detached form.
|
static class |
GenericTypeDescription.ForTypeVariable.OfLoadedType
Description of a loaded type variable.
|
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 |
|---|
ForTypeVariable() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(GenericTypeDescription.Visitor<T> visitor)
Applies a visitor to this generic type description.
|
TypeDescription |
asErasure()
Returns the erasure of this type.
|
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 |
getTypeName()
Returns the name of the 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.
|
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, waitgetSymbol, getUpperBounds, getVariableSourceforEach, spliteratorpublic GenericTypeDescription.Sort getSort()
GenericTypeDescriptiongetSort in interface GenericTypeDescriptionpublic TypeDescription asErasure()
GenericTypeDescriptionGenericTypeDescription.Sort.WILDCARD)
do not have a well-defined erasure and cause an IllegalStateException to be thrown.asErasure 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 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 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 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 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.