|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.jsdt.core.dom.ASTNode
org.eclipse.wst.jsdt.core.dom.Type
public abstract class Type
Abstract base class of all type 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, 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.
Type: PrimitiveType ArrayType SimpleType QualifiedType ParameterizedType WildcardType PrimitiveType: byte short char int long float double boolean void ArrayType: Type [ ] SimpleType: TypeName ParameterizedType: Type < Type { , Type } > QualifiedType: Type . SimpleName WildcardType: ? [ ( extends | super) Type ]Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Field Summary |
---|
Method Summary | |
---|---|
boolean |
isArrayType()
Returns whether this type is an array type ( ArrayType ). |
boolean |
isInferred()
|
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 |
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.eclipse.wst.jsdt.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 |
---|
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 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 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 final ITypeBinding resolveBinding()
Note that bindings are generally unavailable unless requested when the AST is being built.
null
if the binding cannot be
resolvedpublic boolean isInferred()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |