public abstract static class TypeDescription.AbstractTypeDescription extends ModifierReviewable.AbstractModifierReviewable implements TypeDescription
| Modifier and Type | Class and Description |
|---|---|
static class |
TypeDescription.AbstractTypeDescription.OfSimpleType
An adapter implementation of a
TypeDescription that
describes any type that is not an array or a primitive type. |
TypeDescription.AbstractTypeDescription, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.LatentModifierReviewable.AbstractModifierReviewableCLASS, ENUM, OBJECT, STRING, VOIDEMPTY_NAMEEMPTY_MASK| Constructor and Description |
|---|
AbstractTypeDescription() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
int |
getActualModifiers(boolean superFlag)
Returns the type's actual modifiers as present in the class file.
|
String |
getGenericSignature()
Returns the generic signature of this byte code element.
|
AnnotationList |
getInheritedAnnotations()
Returns the annotations that this type declares or inherits from super types.
|
TypeList |
getInheritedInterfaces()
Returns all interfaces that are implemented by this type, either directly or indirectly.
|
String |
getInternalName()
Returns the internal internalName of this byte code element.
|
protected String |
getPackageName()
Returns the name of this type's package.
|
String |
getSourceCodeName()
Returns the name of this byte code element as it is defined in Java source code.
|
int |
hashCode() |
boolean |
isAnnotationReturnType()
Checks if instances of this type can be returned from an annotation method.
|
boolean |
isAnnotationValue()
Checks if instances of this type can be used for describing an annotation value.
|
boolean |
isAnnotationValue(Object value)
Checks if instances of this type can be used for describing the given annotation value.
|
boolean |
isConstantPool()
Checks if instances of this type can be stored in the constant pool of a class.
|
boolean |
isInstance(Object value)
Checks if
value is an instance of the type represented by this instance. |
boolean |
isInstanceOrWrapper(Object value)
Checks if
value is an instance of the type represented by this instance or a wrapper instance of the
corresponding primitive value. |
boolean |
isPrimitiveWrapper()
Checks if this type represents a wrapper type for a primitive type.
|
boolean |
isSamePackage(TypeDescription typeDescription)
Checks if two types are defined in the same package.
|
boolean |
isVisibleTo(TypeDescription typeDescription)
Checks if this element is visible from a given type.
|
String |
toString() |
isAbstract, 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, getComponentType, getDeclaredFields, getDeclaredMethods, getEnclosingMethod, getEnclosingType, getInterfaces, getPackage, getSimpleName, getStackSize, getSupertype, isAnonymousClass, isArray, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isLocalClass, isMemberClass, isPrimitive, representsgetDescriptorgetNamegetModifiers, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatilegetDeclaringTypegetDeclaredAnnotationspublic boolean isInstance(Object value)
TypeDescriptionvalue is an instance of the type represented by this instance.isInstance in interface TypeDescriptionvalue - The object of interest.true if the object is an instance of the type described by this instance.public boolean isInstanceOrWrapper(Object value)
TypeDescriptionvalue is an instance of the type represented by this instance or a wrapper instance of the
corresponding primitive value.isInstanceOrWrapper in interface TypeDescriptionvalue - The object of interest.true if the object is an instance or wrapper of the type described by this instance.public boolean isAnnotationValue(Object value)
TypeDescriptionisAnnotationValue in interface TypeDescriptionvalue - The value that is supposed to describe the annotation value for this instance.true if instances of this type can be used for describing the given annotation value..public String getInternalName()
NamedElementgetInternalName in interface NamedElementpublic int getActualModifiers(boolean superFlag)
TypeDescription
Returns the type's actual modifiers as present in the class file. For example, a type cannot be private.
but it modifiers might reflect this property nevertheless if a class was defined as a private inner class.
Unfortunately, the modifier for marking a static class collides with the SUPER modifier such
that these flags are indistinguishable. Therefore, the flag must be specified manually.
getActualModifiers in interface TypeDescriptionsuperFlag - true if the super flag should be set.public String getGenericSignature()
ByteCodeElementgetGenericSignature in interface ByteCodeElementnull if this element is not generic.public boolean isSamePackage(TypeDescription typeDescription)
TypeDescriptionisSamePackage in interface TypeDescriptiontypeDescription - The type of interest.true if this type and the given type are in the same package.public boolean isVisibleTo(TypeDescription typeDescription)
ByteCodeElementisVisibleTo in interface ByteCodeElementtypeDescription - The type which is checked for its access of this element.true if this element is visible for typeDescription.public TypeList getInheritedInterfaces()
TypeDescriptiongetInheritedInterfaces in interface TypeDescriptionpublic AnnotationList getInheritedAnnotations()
TypeDescriptiongetInheritedAnnotations in interface TypeDescriptionpublic String getSourceCodeName()
NamedElementNamedElement.getName().getSourceCodeName in interface NamedElementprotected String getPackageName()
null if this type is defined in the default package.public boolean isConstantPool()
TypeDescriptionint cannot be stored in the constant pool as those types are represented
as int values internally.isConstantPool in interface TypeDescriptiontrue if instances of this type can be stored in the constant pool of a class.public boolean isPrimitiveWrapper()
TypeDescriptionVoid type is
not considered to be a wrapper type.isPrimitiveWrapper in interface TypeDescriptiontrue if this type represents a wrapper type.public boolean isAnnotationReturnType()
TypeDescriptionisAnnotationReturnType in interface TypeDescriptiontrue if instances of this type can be returned from an annotation method.public boolean isAnnotationValue()
TypeDescriptionisAnnotationValue in interface TypeDescriptiontrue if instances of this type can be used for describing an annotation value.Copyright © 2014–2015. All rights reserved.