|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the ExpressionObject interface used by the ExpressionStack. See the ExpressionStack for details. During processing, the expression tree is built via the methods addOperand(...) and closeOperator(...) which are called on operator expressions. Only classify() should be called on the atom expressions.
Field Summary | |
static int |
ATOM
This ExpressionObject is not an operator. |
static int |
INFIX_OP
This ExpressionObject is an infix operator. |
static int |
LEFT_ASSOC
This operator is left associativity. |
static int |
MAX_PRECEDENCE
No ExpressionObject should return a precedence worse than this value. |
static int |
NON_ASSOC
This operator is non-associative. |
static int |
POSTFIX_OP
This ExpressionObject is a postfix operator. |
static int |
PREFIX_OP
This ExpressionObject is a prefix operator. |
static int |
RIGHT_ASSOC
This operator is right associative. |
static int |
TERNARY_OP
This ExpressionObject is a ternary operator. |
Method Summary | |
void |
addOperand(ExpressionObject e)
Adds an operand to this operator object. |
int |
classify()
Returns the whether an ExpressionObject is an atom, a prefix operator, an infix operator, or a postfix operator. |
void |
closeOperator(java.lang.Object closingArgument)
Called after all operands have been added to allow post-processing. |
int |
getAssociativity()
Returns the associativity of this operator according to the above constants. |
int |
getPrecedence()
Returns a positive number representing the precedence of this ExpressionObject operator. |
Field Detail |
public static final int ATOM
public static final int PREFIX_OP
public static final int INFIX_OP
public static final int POSTFIX_OP
public static final int TERNARY_OP
public static final int MAX_PRECEDENCE
public static final int LEFT_ASSOC
public static final int NON_ASSOC
public static final int RIGHT_ASSOC
Method Detail |
public int classify()
public int getPrecedence()
public int getAssociativity()
public void addOperand(ExpressionObject e)
public void closeOperator(java.lang.Object closingArgument)
closingArgument
- The closing argument passed to the ExpressionStack.
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.