public abstract static class TypeDescription.AbstractTypeDescription.OfSimpleType extends TypeDescription.AbstractTypeDescription
TypeDescription
that
describes any type that is not an array or a primitive type.TypeDescription.AbstractTypeDescription.OfSimpleType
TypeDescription.AbstractTypeDescription, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.Latent
ModifierReviewable.AbstractModifierReviewable
CLASS, ENUM, OBJECT, STRING, VOID
EMPTY_NAME
EMPTY_MASK
Constructor and Description |
---|
OfSimpleType() |
Modifier and Type | Method and Description |
---|---|
TypeDescription |
getComponentType()
Returns the component type of this type.
|
String |
getDescriptor()
Returns the descriptor of this byte code element.
|
String |
getSimpleName()
Returns the simple internalName of this type.
|
StackSize |
getStackSize()
Returns the size of the type described by this instance.
|
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 |
isInstance(Object value)
Checks if
value is an instance of the type represented by this instance. |
boolean |
isPrimitive()
Checks if the type described by this entity is a primitive type.
|
boolean |
represents(Class<?> type)
Checks if the type described by this instance represents
type . |
equals, getActualModifiers, getGenericSignature, getInheritedAnnotations, getInheritedInterfaces, getInternalName, getPackageName, getSourceCodeName, hashCode, isAnnotationReturnType, isAnnotationValue, isAnnotationValue, isConstantPool, isInstanceOrWrapper, 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
getCanonicalName, getDeclaredFields, getDeclaredMethods, getEnclosingMethod, getEnclosingType, getInterfaces, getPackage, getSupertype, isAnonymousClass, isLocalClass, isMemberClass
getName
getModifiers, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
getDeclaringType
getDeclaredAnnotations
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 isInstance(Object value)
TypeDescription
value
is an instance of the type represented by this instance.isInstance
in interface TypeDescription
isInstance
in class TypeDescription.AbstractTypeDescription
value
- The object of interest.true
if the object is an instance of the type described by this instance.public boolean isPrimitive()
TypeDescription
true
if this type description represents a primitive 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 represents(Class<?> type)
TypeDescription
type
.type
- The type of interest.true
if the type described by this instance represents type
.public String getDescriptor()
ByteCodeElement
public String getSimpleName()
TypeDescription
public StackSize getStackSize()
TypeDescription
Copyright © 2014–2015. All rights reserved.