|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.core.dom.ASTNode
org.eclipse.jdt.core.dom.Expression
public abstract class Expression
Abstract base class of AST nodes that represent expressions. There are several kinds of expressions.
Expression: Name IntegerLiteral (includes decimal, hex, and octal forms; and long) FloatingPointLiteral (includes both float and double) CharacterLiteral NullLiteral BooleanLiteral StringLiteral TypeLiteral ThisExpression SuperFieldAccess FieldAccess Assignment ParenthesizedExpression ClassInstanceCreation ArrayCreation ArrayInitializer MethodInvocation SuperMethodInvocation ArrayAccess InfixExpression InstanceofExpression ConditionalExpression PostfixExpression PrefixExpression CastExpression VariableDeclarationExpression
Field Summary |
---|
Method Summary | |
---|---|
boolean |
resolveBoxing()
Returns whether this expression node is the site of a boxing conversion (JLS3 5.1.7). |
java.lang.Object |
resolveConstantExpressionValue()
Resolves and returns the compile-time constant expression value as specified in JLS2 15.28, if this expression has one. |
ITypeBinding |
resolveTypeBinding()
Resolves and returns the binding for the type of this expression. |
boolean |
resolveUnboxing()
Returns whether this expression node is the site of an unboxing conversion (JLS3 5.1.8). |
Methods inherited from class 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 |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final java.lang.Object resolveConstantExpressionValue()
Integer
);
if the type of the value is String
, the result is the string
itself. If the expression does not have a compile-time constant expression
value, the result is null
.
Resolving constant expressions takes into account the value of simple and qualified names that refer to constant variables (JLS2 4.12.4).
Note 1: enum constants are not considered constant expressions.
The result is always null
for these.
Note 2: Compile-time constant expressions cannot denote null
.
So technically NullLiteral
nodes are not constant expressions.
The result is null
for these nonetheless.
null
if this
expression has no constant expression value or if bindings were not
requested when the AST was createdpublic final ITypeBinding resolveTypeBinding()
Note that bindings are generally unavailable unless requested when the AST is being built.
null
if the type cannot be resolvedpublic final boolean resolveBoxing()
true
if this expression is the site of a
boxing conversion, or false
if either no boxing conversion
is involved or if bindings were not requested when the AST was createdpublic final boolean resolveUnboxing()
true
if this expression is the site of an
unboxing conversion, or false
if either no unboxing
conversion is involved or if bindings were not requested when the
AST was created
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |