public class NdComplexTypeSignature extends NdTypeSignature
Arrays are encoded in a special way. The RAW_TYPE points to a sentinel type called '[' and the first type argument holds the array type.
| Modifier and Type | Field and Description |
|---|---|
static FieldOneToMany<NdComplexTypeSignature> |
DECLARED_TYPES |
static FieldManyToOne<NdComplexTypeSignature> |
DECLARING_TYPE |
static FieldManyToOne<NdTypeId> |
RAW_TYPE |
static StructDef<NdComplexTypeSignature> |
type |
static FieldOneToMany<NdTypeArgument> |
TYPE_ARGUMENTS |
static FieldString |
VARIABLE_IDENTIFIER |
ANNOTATIONS_OF_THIS_TYPE, IMPLEMENTATIONS, SUBCLASSES, USED_AS_CONSTANT, USED_AS_ENUM_CONSTANT, USED_AS_EXCEPTION, USED_AS_METHOD_ARGUMENT, USED_AS_RETURN_TYPE, USED_AS_TYPE_ARGUMENT, USED_AS_TYPE_BOUND, VARIABLES_OF_TYPE| Constructor and Description |
|---|
NdComplexTypeSignature(Nd nd) |
NdComplexTypeSignature(Nd nd,
long address) |
| Modifier and Type | Method and Description |
|---|---|
NdTypeSignature |
getArrayDimensionType()
If the receiver is an array type, it returns the signature of the array's next dimension.
|
java.util.List<NdTypeSignature> |
getDeclaringTypeChain()
Returns the chain of declaring generic types.
|
NdComplexTypeSignature |
getGenericDeclaringType()
Returns the declaring type (as reported by the type's generic signature).
|
NdTypeId |
getRawType()
Returns the raw version of this type, if one exists.
|
void |
getSignature(CharArrayBuffer result,
boolean includeTrailingSemicolon) |
java.util.List<NdTypeArgument> |
getTypeArguments()
Returns the type arguments for this type signature, if any.
|
IString |
getVariableIdentifier()
If this type is a type variable, this returns the variable's identifier.
|
boolean |
isArrayType()
Returns true iff this is an array type signature (ie: that getArrayDimensionType() will return a non-null
answer).
|
boolean |
isTypeVariable() |
void |
setGenericDeclaringType(NdComplexTypeSignature enclosingType) |
void |
setRawType(NdTypeId rawType) |
void |
setVariableIdentifier(char[] variableIdentifier) |
getImplementations, getSignature, getSubclasses, getSubTypes, toStringpublic static final FieldString VARIABLE_IDENTIFIER
public static final FieldManyToOne<NdTypeId> RAW_TYPE
public static final FieldOneToMany<NdTypeArgument> TYPE_ARGUMENTS
public static final FieldManyToOne<NdComplexTypeSignature> DECLARING_TYPE
public static final FieldOneToMany<NdComplexTypeSignature> DECLARED_TYPES
public static final StructDef<NdComplexTypeSignature> type
public NdComplexTypeSignature(Nd nd, long address)
public NdComplexTypeSignature(Nd nd)
public NdTypeId getRawType()
NdTypeSignaturegetRawType in class NdTypeSignaturepublic void setVariableIdentifier(char[] variableIdentifier)
public IString getVariableIdentifier()
public void setRawType(NdTypeId rawType)
public void setGenericDeclaringType(NdComplexTypeSignature enclosingType)
public NdComplexTypeSignature getGenericDeclaringType()
NdType.getDeclaringType(). Any class that is
nested inside another class with generic arguments will have one of
these. Classes nested inside non-generic classes won't have one of these,
and neither will non-nested classes.public java.util.List<NdTypeArgument> getTypeArguments()
NdTypeSignaturegetTypeArguments in class NdTypeSignaturepublic NdTypeSignature getArrayDimensionType()
NdTypeSignaturegetArrayDimensionType in class NdTypeSignaturepublic void getSignature(CharArrayBuffer result, boolean includeTrailingSemicolon)
getSignature in class NdTypeSignaturepublic boolean isTypeVariable()
isTypeVariable in class NdTypeSignaturepublic java.util.List<NdTypeSignature> getDeclaringTypeChain()
NdTypeSignaturegetDeclaringTypeChain in class NdTypeSignaturepublic boolean isArrayType()
NdTypeSignatureIn other words:
NdVariable someVariable = getSomeVariableWithAnArrayType() System.out.println(someVariable.getType().isArrayType()); // true System.out.println(someVariable.getType().getRawType().isArrayType()); // false
isArrayType in class NdTypeSignature