|
Eclipse JDT Release 3.0 |
||||||||||
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
org.eclipse.jdt.core.dom.InfixExpression
Infix expression AST node type.
InfixExpression: Expression InfixOperator Expression { InfixOperator Expression }
Nested Class Summary | |
static class |
InfixExpression.Operator
Infix operators (typesafe enumeration). |
Field Summary | |
static ChildListPropertyDescriptor |
EXTENDED_OPERANDS_PROPERTY
The "extendedOperands" structural property of this node type. |
static ChildPropertyDescriptor |
LEFT_OPERAND_PROPERTY
The "leftOperand" structural property of this node type. |
static SimplePropertyDescriptor |
OPERATOR_PROPERTY
The "operator" structural property of this node type. |
static ChildPropertyDescriptor |
RIGHT_OPERAND_PROPERTY
The "rightOperand" structural property of this node type. |
Method Summary | |
List |
extendedOperands()
Returns the live list of extended operands. |
Expression |
getLeftOperand()
Returns the left operand of this infix expression. |
InfixExpression.Operator |
getOperator()
Returns the operator of this infix expression. |
Expression |
getRightOperand()
Returns the right operand of this infix expression. |
boolean |
hasExtendedOperands()
Returns where there are any extended operands. |
static List |
propertyDescriptors(int apiLevel)
Returns a list of structural property descriptors for this node type. |
void |
setLeftOperand(Expression expression)
Sets the left operand of this infix expression. |
void |
setOperator(InfixExpression.Operator operator)
Sets the operator of this infix expression. |
void |
setRightOperand(Expression expression)
Sets the right operand of this infix expression. |
Methods inherited from class org.eclipse.jdt.core.dom.Expression |
resolveTypeBinding |
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, nodeClassForType, properties, setFlags, setProperty, setSourceRange, setStructuralProperty, structuralPropertiesForType, subtreeBytes, subtreeMatch, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ChildPropertyDescriptor LEFT_OPERAND_PROPERTY
public static final SimplePropertyDescriptor OPERATOR_PROPERTY
public static final ChildPropertyDescriptor RIGHT_OPERAND_PROPERTY
public static final ChildListPropertyDescriptor EXTENDED_OPERANDS_PROPERTY
Method Detail |
public static List propertyDescriptors(int apiLevel)
apiLevel
- the API level; one of the
AST.JLS*
constants
StructuralPropertyDescriptor
)public InfixExpression.Operator getOperator()
public void setOperator(InfixExpression.Operator operator)
operator
- the infix operator
IllegalArgumentException
- if the argument is incorrectpublic Expression getLeftOperand()
public void setLeftOperand(Expression expression)
expression
- the left operand node
IllegalArgumentException
- if:
public Expression getRightOperand()
public void setRightOperand(Expression expression)
expression
- the right operand node
IllegalArgumentException
- if:
public boolean hasExtendedOperands()
true
if there are one or more extended operands,
and false
if there are no extended operandspublic List extendedOperands()
The extended operands is the preferred way of representing deeply nested
expressions of the form L op R op R2 op R3...
where
the same operator appears between all the operands (the most
common case being lengthy string concatenation expressions). Using
the extended operands keeps the trees from getting too deep; this
decreases the risk is running out of thread stack space at runtime
when traversing such trees.
((a + b) + c) + d would be translated to:
leftOperand: a
rightOperand: b
extendedOperands: {c, d}
operator: +
Expression
)
|
Eclipse JDT Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |