Class NdTypeSignature
- All Implemented Interfaces:
IDestructable,INdStruct
- Direct Known Subclasses:
NdComplexTypeSignature,NdTypeId
Holds back-pointers to all the entities that refer to the name, along with pointers to all classes that have this
name. Note that this isn't the class declaration itself. The same index can hold multiple jar files, some of which
may contain classes with the same name. All classes that use this fully-qualified name point to the same
NdTypeSignature.
Other entities should refer to a type via its TypeId if there is any possiblity that the type may change based on the classpath. It should refer to the type directly if there is no possibility for a type lookup. For example, nested classes refer to their enclosing class directly since they live in the same file and there is no possibility for the enclosing class to change based on the classpath. Classes refer to their base class via its TypeId since the parent class might live in a different jar and need to be resolved on the classpath.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic FieldOneToMany<NdAnnotation>static FieldOneToMany<NdTypeInterface>static FieldOneToMany<NdType>static StructDef<NdTypeSignature>static FieldOneToMany<NdConstantClass>static FieldOneToMany<NdConstantEnum>static FieldOneToMany<NdMethodException>static FieldOneToMany<NdMethodParameter>static FieldOneToMany<NdMethod>static FieldOneToMany<NdTypeArgument>static FieldOneToMany<NdTypeBound>static FieldOneToMany<NdVariable> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract NdTypeSignatureIf the receiver is an array type, it returns the signature of the array's next dimension.abstract List<NdTypeSignature>Returns the chain of declaring generic types.abstract NdTypeIdReturns the raw version of this type, if one exists.voidgetSignature(CharArrayBuffer result)abstract voidgetSignature(CharArrayBuffer result, boolean includeTrailingSemicolon)Returns all subclasses (for classes) and implementations (for interfaces) of this typeabstract List<NdTypeArgument>Returns the type arguments for this type signature, if any.abstract booleanReturns true iff this is an array type signature (ie: that getArrayDimensionType() will return a non-null answer).abstract booleantoString()Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.nd.NdNode
delete, destruct, equals, getAddress, getBindingID, getBit, getByte, getNodeId, getNodeType, hashCode, load, load
-
Field Details
-
SUBCLASSES
-
ANNOTATIONS_OF_THIS_TYPE
-
IMPLEMENTATIONS
-
VARIABLES_OF_TYPE
-
USED_AS_CONSTANT
-
USED_AS_ENUM_CONSTANT
-
USED_AS_TYPE_ARGUMENT
-
USED_AS_TYPE_BOUND
-
USED_AS_METHOD_ARGUMENT
-
USED_AS_EXCEPTION
-
USED_AS_RETURN_TYPE
-
type
-
-
Constructor Details
-
NdTypeSignature
-
NdTypeSignature
-
-
Method Details
-
getSubclasses
-
getImplementations
-
getSubTypes
Returns all subclasses (for classes) and implementations (for interfaces) of this type -
getRawType
Returns the raw version of this type, if one exists. That is, the version of this type without any generic arguments or annotations, which the java runtime sees. Returns null of this signature doesn't have a raw type, for example if it is a type variable. -
getSignature
-
getSignature
-
isArrayType
public abstract boolean isArrayType()Returns true iff this is an array type signature (ie: that getArrayDimensionType() will return a non-null answer). Note that this only returns true for the type signature that holds the reference to the array dimension type. The raw type for that signature will return false, even though it has a field descriptor starting with '['.In other words:
NdVariable someVariable = getSomeVariableWithAnArrayType() System.out.println(someVariable.getType().isArrayType()); // true System.out.println(someVariable.getType().getRawType().isArrayType()); // false
-
isTypeVariable
public abstract boolean isTypeVariable() -
getDeclaringTypeChain
Returns the chain of declaring generic types. The first element in the chain is a top-level type and the receiver is the last element in the chain. -
getArrayDimensionType
If the receiver is an array type, it returns the signature of the array's next dimension. Returns null if this is not an array type. -
getTypeArguments
Returns the type arguments for this type signature, if any. Returns the empty list if none. -
toString
-