public abstract static class GenericTypeDescription.ForGenericArray extends Object implements GenericTypeDescription
| Modifier and Type | Class and Description |
|---|---|
static class |
GenericTypeDescription.ForGenericArray.Latent
A latent implementation of a generic array type.
|
static class |
GenericTypeDescription.ForGenericArray.OfLoadedType
A description of a loaded generic array 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 |
|---|
ForGenericArray() |
| 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) |
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. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComponentTypeforEach, 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 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 TypeVariableSource getVariableSource()
GenericTypeDescriptionGenericTypeDescription.Sort.VARIABLE. For other types, this method
throws an IllegalStateException.getVariableSource in interface GenericTypeDescriptionpublic 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 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 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 represents(Type type)
GenericTypeDescriptiontype.represents in interface GenericTypeDescriptiontype - The type of interest.true if the type described by this instance represents type.public 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 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.