| java.lang.Object org.eclipse.jdt.core.dom.ASTNode org.eclipse.jdt.core.dom.Expression
All known Subclasses: org.eclipse.jdt.core.dom.ArrayAccess, org.eclipse.jdt.core.dom.ConditionalExpression, org.eclipse.jdt.core.dom.InfixExpression, org.eclipse.jdt.core.dom.NumberLiteral, org.eclipse.jdt.core.dom.ArrayCreation, org.eclipse.jdt.core.dom.InstanceofExpression, org.eclipse.jdt.core.dom.PostfixExpression, org.eclipse.jdt.core.dom.StringLiteral, org.eclipse.jdt.core.dom.BooleanLiteral, org.eclipse.jdt.core.dom.ClassInstanceCreation, org.eclipse.jdt.core.dom.PrefixExpression, org.eclipse.jdt.core.dom.MethodInvocation, org.eclipse.jdt.core.dom.ArrayInitializer, org.eclipse.jdt.core.dom.CharacterLiteral, org.eclipse.jdt.core.dom.VariableDeclarationExpression, org.eclipse.jdt.core.dom.NullLiteral, org.eclipse.jdt.core.dom.CastExpression, org.eclipse.jdt.core.dom.ParenthesizedExpression, org.eclipse.jdt.core.dom.SuperMethodInvocation, org.eclipse.jdt.core.dom.SuperFieldAccess, org.eclipse.jdt.core.dom.ThisExpression, org.eclipse.jdt.core.dom.TypeLiteral, org.eclipse.jdt.core.dom.FieldAccess, org.eclipse.jdt.core.dom.Assignment, org.eclipse.jdt.core.dom.Name, org.eclipse.jdt.core.dom.Annotation,
Expression | abstract public class Expression extends ASTNode (Code) | | 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
since: 2.0 |
Constructor Summary | |
| Expression(AST ast) Creates a new AST node for an expression owned by the given AST.
N.B. |
Method Summary | |
final public boolean | resolveBoxing() Returns whether this expression node is the site of a boxing
conversion (JLS3 5.1.7). | final public Object | resolveConstantExpressionValue() Resolves and returns the compile-time constant expression value as
specified in JLS2 15.28, if this expression has one. | final public ITypeBinding | resolveTypeBinding() Resolves and returns the binding for the type of this expression. | final public boolean | resolveUnboxing() Returns whether this expression node is the site of an unboxing
conversion (JLS3 5.1.8). |
Expression | Expression(AST ast)(Code) | | Creates a new AST node for an expression owned by the given AST.
N.B. This constructor is package-private.
Parameters: ast - the AST that is to own this node |
resolveBoxing | final public boolean resolveBoxing()(Code) | | Returns whether this expression node is the site of a boxing
conversion (JLS3 5.1.7). This information is available only
when bindings are requested when the AST is being built.
true if this expression is the site of aboxing conversion, or false if either no boxing conversionis involved or if bindings were not requested when the AST was created since: 3.1 |
resolveConstantExpressionValue | final public Object resolveConstantExpressionValue()(Code) | | Resolves and returns the compile-time constant expression value as
specified in JLS2 15.28, if this expression has one. Constant expression
values are unavailable unless bindings are requested when the AST is
being built. If the type of the value is a primitive type, the result
is the boxed equivalent (i.e., int returned as an 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.
the constant expression value, or null if thisexpression has no constant expression value or if bindings were notrequested when the AST was created since: 3.1 |
resolveTypeBinding | final public ITypeBinding resolveTypeBinding()(Code) | | Resolves and returns the binding for the type of this expression.
Note that bindings are generally unavailable unless requested when the
AST is being built.
the binding for the type of this expression, ornull if the type cannot be resolved |
resolveUnboxing | final public boolean resolveUnboxing()(Code) | | Returns whether this expression node is the site of an unboxing
conversion (JLS3 5.1.8). This information is available only
when bindings are requested when the AST is being built.
true if this expression is the site of anunboxing conversion, or false if either no unboxingconversion is involved or if bindings were not requested when theAST was created since: 3.1 |
Methods inherited from org.eclipse.jdt.core.dom.ASTNode | final public void accept(ASTVisitor visitor)(Code)(Java Doc) abstract void accept0(ASTVisitor visitor)(Code)(Java Doc) final void acceptChild(ASTVisitor visitor, ASTNode child)(Code)(Java Doc) final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children)(Code)(Java Doc) static void addProperty(StructuralPropertyDescriptor property, List propertyList)(Code)(Java Doc) void appendDebugString(StringBuffer buffer)(Code)(Java Doc) final void appendPrintString(StringBuffer buffer)(Code)(Java Doc) final void checkModifiable()(Code)(Java Doc) static void checkNewChild(ASTNode node, ASTNode newChild, boolean cycleCheck, Class nodeType)(Code)(Java Doc) final ASTNode clone(AST target)(Code)(Java Doc) abstract ASTNode clone0(AST target)(Code)(Java Doc) public static ASTNode copySubtree(AST target, ASTNode node)(Code)(Java Doc) public static List copySubtrees(AST target, List nodes)(Code)(Java Doc) static void createPropertyList(Class nodeClass, List propertyList)(Code)(Java Doc) final public void delete()(Code)(Java Doc) final public boolean equals(Object obj)(Code)(Java Doc) final public AST getAST()(Code)(Java Doc) final public int getFlags()(Code)(Java Doc) final public int getLength()(Code)(Java Doc) final public StructuralPropertyDescriptor getLocationInParent()(Code)(Java Doc) final public int getNodeType()(Code)(Java Doc) abstract int getNodeType0()(Code)(Java Doc) final public ASTNode getParent()(Code)(Java Doc) final public Object getProperty(String propertyName)(Code)(Java Doc) final public ASTNode getRoot()(Code)(Java Doc) final public int getStartPosition()(Code)(Java Doc) final public Object getStructuralProperty(StructuralPropertyDescriptor property)(Code)(Java Doc) final public int hashCode()(Code)(Java Doc) List internalGetChildListProperty(ChildListPropertyDescriptor property)(Code)(Java Doc) boolean internalGetSetBooleanProperty(SimplePropertyDescriptor property, boolean get, boolean value)(Code)(Java Doc) ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child)(Code)(Java Doc) int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value)(Code)(Java Doc) Object internalGetSetObjectProperty(SimplePropertyDescriptor property, boolean get, Object value)(Code)(Java Doc) abstract List internalStructuralPropertiesForType(int apiLevel)(Code)(Java Doc) abstract int memSize()(Code)(Java Doc) public static Class nodeClassForType(int nodeType)(Code)(Java Doc) final void postLazyInit(ASTNode newChild, ChildPropertyDescriptor property)(Code)(Java Doc) final void postReplaceChild(ASTNode oldChild, ASTNode newChild, ChildPropertyDescriptor property)(Code)(Java Doc) final void postValueChange(SimplePropertyDescriptor property)(Code)(Java Doc) final void preLazyInit()(Code)(Java Doc) final void preReplaceChild(ASTNode oldChild, ASTNode newChild, ChildPropertyDescriptor property)(Code)(Java Doc) final void preValueChange(SimplePropertyDescriptor property)(Code)(Java Doc) final public Map properties()(Code)(Java Doc) static List reapPropertyList(List propertyList)(Code)(Java Doc) final public void setFlags(int flags)(Code)(Java Doc) final void setParent(ASTNode parent, StructuralPropertyDescriptor property)(Code)(Java Doc) final public void setProperty(String propertyName, Object data)(Code)(Java Doc) final public void setSourceRange(int startPosition, int length)(Code)(Java Doc) final public void setStructuralProperty(StructuralPropertyDescriptor property, Object value)(Code)(Java Doc) final String standardToString()(Code)(Java Doc) static int stringSize(String string)(Code)(Java Doc) final public List structuralPropertiesForType()(Code)(Java Doc) final public int subtreeBytes()(Code)(Java Doc) final public boolean subtreeMatch(ASTMatcher matcher, Object other)(Code)(Java Doc) abstract boolean subtreeMatch0(ASTMatcher matcher, Object other)(Code)(Java Doc) final void supportedOnlyIn2()(Code)(Java Doc) final public String toString()(Code)(Java Doc) abstract int treeSize()(Code)(Java Doc) final void unsupportedIn2()(Code)(Java Doc)
|
|
|