public static class TypeDescription.ArrayProjection extends TypeDescription.AbstractTypeDescription
TypeDescription
.TypeDescription.AbstractTypeDescription.OfSimpleType
TypeDescription.AbstractTypeDescription, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.Latent
ModifierReviewable.AbstractModifierReviewable
CLASS, OBJECT, STRING, VOID
EMPTY_NAME
EMPTY_MASK
Modifier | Constructor and Description |
---|---|
protected |
ArrayProjection(TypeDescription componentType,
int arity)
Crrates a new array projection.
|
Modifier and Type | Method and Description |
---|---|
String |
getCanonicalName()
Returns the canonical internalName of this type.
|
TypeDescription |
getComponentType()
Returns the component type of this type.
|
AnnotationList |
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.
|
FieldList |
getDeclaredFields()
Returns a list of fields that are declared by this type.
|
MethodList |
getDeclaredMethods()
Returns a list of methods that are declared by this type.
|
TypeDescription |
getDeclaringType()
Returns the declaring type of this instance.
|
String |
getDescriptor()
Returns the descriptor of this byte code element.
|
MethodDescription |
getEnclosingMethod()
Returns a description of the enclosing method of this type.
|
TypeDescription |
getEnclosingType()
Returns a description of the enclosing type of this type.
|
AnnotationList |
getInheritedAnnotations()
Returns the annotations that this type declares or inherits from super types.
|
TypeList |
getInterfaces()
Returns a list of interfaces that are implemented by this type.
|
int |
getModifiers()
Returns the modifier that is described by this object.
|
String |
getName()
Returns the internalName of this byte code element.
|
PackageDescription |
getPackage()
Returns the package internalName of the type described by this instance.
|
String |
getSimpleName()
Returns the simple internalName of this type.
|
StackSize |
getStackSize()
Returns the size of the type described by this instance.
|
TypeDescription |
getSupertype()
Returns the component type of this type.
|
boolean |
isAnonymousClass()
Checks if this type description represents an anonymous type.
|
boolean |
isArray()
Checks if the type described by this entity is an array.
|
boolean |
isAssignableFrom(Class<?> type)
Checks if this type is assignable from the type described by this instance, for example for
class Foo and class Bar extends Foo , this method would return true for
Foo.class.isAssignableFrom(Bar.class) . |
boolean |
isAssignableFrom(TypeDescription typeDescription)
Checks if this type is assignable from the type described by this instance, for example for
class Foo and class Bar extends Foo , this method would return true for
Foo.class.isAssignableFrom(Bar.class) . |
boolean |
isAssignableTo(Class<?> type)
Checks if this type is assignable from the type described by this instance, for example for
class Foo and class Bar extends Foo , this method would return true for
Bar.class.isAssignableTo(Foo.class) . |
boolean |
isAssignableTo(TypeDescription typeDescription)
Checks if this type is assignable from the type described by this instance, for example for
class Foo and class Bar extends Foo , this method would return true for
Bar.class.isAssignableFrom(Foo.class) . |
boolean |
isLocalClass()
Checks if this type description represents a local type.
|
boolean |
isMemberClass()
Checks if this type description represents a member type.
|
boolean |
isPrimitive()
Checks if the type described by this entity is a primitive type.
|
static TypeDescription |
of(TypeDescription componentType,
int arity)
Creates an array projection.
|
boolean |
represents(Class<?> type)
Checks if the type described by this instance represents
type . |
equals, getActualModifiers, getGenericSignature, getInheritedInterfaces, getInternalName, getPackageName, getSourceCodeName, hashCode, isAnnotationValue, isConstantPool, isInstance, isPrimitiveWrapper, isSamePackage, isVisibleTo, toString
isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
protected ArrayProjection(TypeDescription componentType, int arity)
componentType
- The base component type of the array which is itself not an array.arity
- The arity of this array.public static TypeDescription of(TypeDescription componentType, int arity)
componentType
- The component type of the array.arity
- The arity of this array.public boolean isAssignableFrom(Class<?> type)
TypeDescription
class Foo
and class Bar extends Foo
, this method would return true
for
Foo.class.isAssignableFrom(Bar.class)
.type
- The type of interest.true
if this type is assignable from type
.public boolean isAssignableFrom(TypeDescription typeDescription)
TypeDescription
class Foo
and class Bar extends Foo
, this method would return true
for
Foo.class.isAssignableFrom(Bar.class)
.
Implementations of this methods are allowed to delegate to
TypeDescription.isAssignableFrom(Class)
typeDescription
- The type of interest.true
if this type is assignable from type
.public boolean isAssignableTo(Class<?> type)
TypeDescription
class Foo
and class Bar extends Foo
, this method would return true
for
Bar.class.isAssignableTo(Foo.class)
.type
- The type of interest.true
if this type is assignable to type
.public boolean isAssignableTo(TypeDescription typeDescription)
TypeDescription
class Foo
and class Bar extends Foo
, this method would return true
for
Bar.class.isAssignableFrom(Foo.class)
.
Implementations of this methods are allowed to delegate to
TypeDescription.isAssignableTo(Class)
typeDescription
- The type of interest.true
if this type is assignable to type
.public boolean represents(Class<?> type)
TypeDescription
type
.type
- The type of interest.true
if the type described by this instance represents type
.public boolean isArray()
TypeDescription
true
if this type description represents an array.public TypeDescription getComponentType()
TypeDescription
null
if this type description does not represent an array.public boolean isPrimitive()
TypeDescription
true
if this type description represents a primitive type.public TypeDescription getSupertype()
TypeDescription
null
if type does not have a super type as for the
Object
type.public TypeList getInterfaces()
TypeDescription
public MethodDescription getEnclosingMethod()
TypeDescription
null
if there is no such method.public TypeDescription getEnclosingType()
TypeDescription
null
if there is no such type.public String getSimpleName()
TypeDescription
public String getCanonicalName()
TypeDescription
public boolean isAnonymousClass()
TypeDescription
true
if this type description represents an anonymous type.public boolean isLocalClass()
TypeDescription
true
if this type description represents a local type.public boolean isMemberClass()
TypeDescription
true
if this type description represents a member type.public FieldList getDeclaredFields()
TypeDescription
public MethodList getDeclaredMethods()
TypeDescription
public StackSize getStackSize()
TypeDescription
public AnnotationList getDeclaredAnnotations()
AnnotatedElement
public AnnotationList getInheritedAnnotations()
TypeDescription
getInheritedAnnotations
in interface TypeDescription
getInheritedAnnotations
in class TypeDescription.AbstractTypeDescription
public PackageDescription getPackage()
TypeDescription
public String getName()
NamedElement
public String getDescriptor()
ByteCodeElement
public TypeDescription getDeclaringType()
DeclaredInType
null
if no such type exists.public int getModifiers()
ModifierReviewable
Copyright © 2014–2015. All rights reserved.