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.OfSimpleTypeTypeDescription.AbstractTypeDescription, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.LatentModifierReviewable.AbstractModifierReviewableCLASS, ENUM, OBJECT, STRING, VOIDEMPTY_NAMEEMPTY_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, toStringisAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatileclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCanonicalName, getDeclaredFields, getDeclaredMethods, getEnclosingMethod, getEnclosingType, getInterfaces, getPackage, getSupertype, isAnonymousClass, isLocalClass, isMemberClassgetNamegetModifiers, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatilegetDeclaringTypegetDeclaredAnnotationspublic boolean isAssignableFrom(Class<?> type)
TypeDescriptionclass 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)
TypeDescriptionclass 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)
TypeDescriptionclass 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)
TypeDescriptionclass 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)
TypeDescriptionvalue is an instance of the type represented by this instance.isInstance in interface TypeDescriptionisInstance in class TypeDescription.AbstractTypeDescriptionvalue - The object of interest.true if the object is an instance of the type described by this instance.public boolean isPrimitive()
TypeDescriptiontrue if this type description represents a primitive type.public boolean isArray()
TypeDescriptiontrue if this type description represents an array.public TypeDescription getComponentType()
TypeDescriptionnull if this type description does not represent an array.public boolean represents(Class<?> type)
TypeDescriptiontype.type - The type of interest.true if the type described by this instance represents type.public String getDescriptor()
ByteCodeElementpublic String getSimpleName()
TypeDescriptionpublic StackSize getStackSize()
TypeDescriptionCopyright © 2014–2015. All rights reserved.