|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.core.dom.ASTNode
org.aspectj.org.eclipse.jdt.core.dom.Type
public abstract class Type
Abstract base class of all type reference AST node types. A type node represents a reference to a primitive type (including void), to an array type, or to a simple named type (or type variable), to a qualified type, to a parameterized type, to a union type, to an intersection type, or to a wildcard type. Note that not all of these are meaningful in all contexts; for example, a wildcard type is only meaningful in the type argument position of a parameterized type. UnionType got introduced in JLS4 to support common catch blocks for disjunctive types. For JLS8, optional annotations indicated by {Annotation} got added.
Type:
AnnotatableType:
PrimitiveType
SimpleType
QualifiedType
NameQualifiedType
WildcardType
ArrayType
ParameterizedType
UnionType
IntersectionType
PrimitiveType:
{ Annotation } byte
{ Annotation } short
{ Annotation } char
{ Annotation } int
{ Annotation } long
{ Annotation } float
{ Annotation } double
{ Annotation } boolean
{ Annotation } void
ArrayType:
Type Dimension { Dimension }
SimpleType:
{ Annotation } TypeName
QualifiedType:
Type . {Annotation} SimpleName
NameQualifiedType:
Name . { Annotation } SimpleName
WildcardType:
{ Annotation } ? [ ( extends | super) Type ]
ParameterizedType:
Type < Type { , Type } >
UnionType:
Type | Type { | Type }
IntersectionType:
Type & Type { & Type }
| Field Summary |
|---|
| Method Summary | |
|---|---|
boolean |
isAnnotatable()
Returns whether this type can be annotated. |
boolean |
isArrayType()
Returns whether this type is an array type ( ArrayType). |
boolean |
isIntersectionType()
Returns whether this type is an intersection type ( IntersectionType). |
boolean |
isNameQualifiedType()
Returns whether this type is a name qualified type ( NameQualifiedType). |
boolean |
isParameterizedType()
Returns whether this type is a parameterized type ( ParameterizedType). |
boolean |
isPrimitiveType()
Returns whether this type is a primitive type ( PrimitiveType). |
boolean |
isQualifiedType()
Returns whether this type is a qualified type ( QualifiedType). |
boolean |
isSimpleType()
Returns whether this type is a simple type ( SimpleType). |
boolean |
isUnionType()
Returns whether this type is a union type ( UnionType). |
boolean |
isWildcardType()
Returns whether this type is a wildcard type ( WildcardType). |
ITypeBinding |
resolveBinding()
Resolves and returns the binding for this type. |
| Methods inherited from class org.aspectj.org.eclipse.jdt.core.dom.ASTNode |
|---|
accept, copySubtree, copySubtrees, delete, equals, getAST, getFlags, getLength, getLocationInParent, getNodeType, getParent, getProperty, getRoot, getStartPosition, getStructuralProperty, hashCode, nodeClassForType, properties, setFlags, setProperty, setSourceRange, setStructuralProperty, structuralPropertiesForType, subtreeBytes, subtreeMatch, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public final boolean isPrimitiveType()
PrimitiveType).
true if this is a primitive type, and
false otherwisepublic final boolean isSimpleType()
SimpleType).
true if this is a simple type, and
false otherwisepublic final boolean isArrayType()
ArrayType).
true if this is an array type, and
false otherwisepublic final boolean isNameQualifiedType()
NameQualifiedType).
true if this is a name qualified type, and
false otherwisepublic final boolean isParameterizedType()
ParameterizedType).
true if this is a parameterized type, and
false otherwisepublic final boolean isQualifiedType()
QualifiedType).
Note that a type like "A.B" can be represented either of two ways:
QualifiedType(SimpleType(SimpleName("A")),SimpleName("B"))
SimpleType(QualifiedName(SimpleName("A"),SimpleName("B")))
true if this is a qualified type, and
false otherwisepublic final boolean isUnionType()
UnionType).
true if this is a union type, and
false otherwisepublic final boolean isIntersectionType()
IntersectionType).
true if this is an intersection type, and
false otherwisepublic final boolean isWildcardType()
WildcardType).
Note that a wildcard type is only meaningful as a
type argument of a ParameterizedType node.
true if this is a wildcard type, and
false otherwisepublic boolean isAnnotatable()
AnnotatableType can be annotated.
true if this type is an instance of AnnotatableType, and
false otherwisepublic final ITypeBinding resolveBinding()
Note that bindings are generally unavailable unless requested when the AST is being built.
null if the binding cannot be
resolved
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||