public abstract class NdTypeSignature extends NdNode
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.
| Modifier and Type | Field and Description |
|---|---|
static FieldOneToMany<NdAnnotation> |
ANNOTATIONS_OF_THIS_TYPE |
static FieldOneToMany<NdTypeInterface> |
IMPLEMENTATIONS |
static FieldOneToMany<NdType> |
SUBCLASSES |
static StructDef<NdTypeSignature> |
type |
static FieldOneToMany<NdConstantClass> |
USED_AS_CONSTANT |
static FieldOneToMany<NdConstantEnum> |
USED_AS_ENUM_CONSTANT |
static FieldOneToMany<NdMethodException> |
USED_AS_EXCEPTION |
static FieldOneToMany<NdMethodParameter> |
USED_AS_METHOD_ARGUMENT |
static FieldOneToMany<NdMethod> |
USED_AS_RETURN_TYPE |
static FieldOneToMany<NdTypeArgument> |
USED_AS_TYPE_ARGUMENT |
static FieldOneToMany<NdTypeBound> |
USED_AS_TYPE_BOUND |
static FieldOneToMany<NdVariable> |
VARIABLES_OF_TYPE |
| Constructor and Description |
|---|
NdTypeSignature(Nd nd) |
NdTypeSignature(Nd nd,
long address) |
| Modifier and Type | Method and Description |
|---|---|
abstract NdTypeSignature |
getArrayDimensionType()
If the receiver is an array type, it returns the signature of the array's next dimension.
|
abstract java.util.List<NdTypeSignature> |
getDeclaringTypeChain()
Returns the chain of declaring generic types.
|
java.util.List<NdTypeInterface> |
getImplementations() |
abstract NdTypeId |
getRawType()
Returns the raw version of this type, if one exists.
|
void |
getSignature(CharArrayBuffer result) |
abstract void |
getSignature(CharArrayBuffer result,
boolean includeTrailingSemicolon) |
java.util.List<NdType> |
getSubclasses() |
java.util.List<NdType> |
getSubTypes()
Returns all subclasses (for classes) and implementations (for interfaces) of this type
|
abstract java.util.List<NdTypeArgument> |
getTypeArguments()
Returns the type arguments for this type signature, if any.
|
abstract boolean |
isArrayType()
Returns true iff this is an array type signature (ie: that getArrayDimensionType() will return a non-null
answer).
|
abstract boolean |
isTypeVariable() |
java.lang.String |
toString() |
public static final FieldOneToMany<NdType> SUBCLASSES
public static final FieldOneToMany<NdAnnotation> ANNOTATIONS_OF_THIS_TYPE
public static final FieldOneToMany<NdTypeInterface> IMPLEMENTATIONS
public static final FieldOneToMany<NdVariable> VARIABLES_OF_TYPE
public static final FieldOneToMany<NdConstantClass> USED_AS_CONSTANT
public static final FieldOneToMany<NdConstantEnum> USED_AS_ENUM_CONSTANT
public static final FieldOneToMany<NdTypeArgument> USED_AS_TYPE_ARGUMENT
public static final FieldOneToMany<NdTypeBound> USED_AS_TYPE_BOUND
public static final FieldOneToMany<NdMethodParameter> USED_AS_METHOD_ARGUMENT
public static final FieldOneToMany<NdMethodException> USED_AS_EXCEPTION
public static final FieldOneToMany<NdMethod> USED_AS_RETURN_TYPE
public static StructDef<NdTypeSignature> type
public NdTypeSignature(Nd nd, long address)
public NdTypeSignature(Nd nd)
public java.util.List<NdType> getSubclasses()
public java.util.List<NdTypeInterface> getImplementations()
public java.util.List<NdType> getSubTypes()
public abstract NdTypeId getRawType()
public final void getSignature(CharArrayBuffer result)
public abstract void getSignature(CharArrayBuffer result, boolean includeTrailingSemicolon)
public abstract boolean isArrayType()
In other words:
NdVariable someVariable = getSomeVariableWithAnArrayType() System.out.println(someVariable.getType().isArrayType()); // true System.out.println(someVariable.getType().getRawType().isArrayType()); // false
public abstract boolean isTypeVariable()
public abstract java.util.List<NdTypeSignature> getDeclaringTypeChain()
public abstract NdTypeSignature getArrayDimensionType()
public abstract java.util.List<NdTypeArgument> getTypeArguments()
public java.lang.String toString()
toString in class java.lang.Object