|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jxpath.ri.compiler.Expression
org.apache.commons.jxpath.ri.compiler.Operation
org.apache.commons.jxpath.ri.compiler.CoreOperation
public abstract class CoreOperation
The common subclass for tree elements representing core operations like "+", "- ", "*" etc.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.commons.jxpath.ri.compiler.Expression |
---|
Expression.PointerIterator, Expression.ValueIterator |
Field Summary | |
---|---|
protected static int |
ADD_PRECEDENCE
add/subtract precedence |
protected static int |
AND_PRECEDENCE
and precedence |
protected static int |
COMPARE_PRECEDENCE
compare precedence |
protected static int |
MULTIPLY_PRECEDENCE
multiply/divide/mod precedence |
protected static int |
NEGATE_PRECEDENCE
negate precedence |
protected static int |
OR_PRECEDENCE
or precedence |
protected static int |
RELATIONAL_EXPR_PRECEDENCE
relational expression precedence |
protected static int |
UNION_PRECEDENCE
union precedence |
Fields inherited from class org.apache.commons.jxpath.ri.compiler.Operation |
---|
args |
Fields inherited from class org.apache.commons.jxpath.ri.compiler.Expression |
---|
NOT_A_NUMBER, ONE, ZERO |
Constructor Summary | |
---|---|
CoreOperation(Expression[] args)
Create a new CoreOperation. |
Method Summary | |
---|---|
Object |
compute(EvalContext context)
Evaluates the expression. |
abstract Object |
computeValue(EvalContext context)
Evaluates the expression. |
protected abstract int |
getPrecedence()
Computes the precedence of the operation. |
abstract String |
getSymbol()
Returns the XPath symbol for this operation, e.g. |
protected abstract boolean |
isSymmetric()
Returns true if the operation is not sensitive to the order of arguments, e.g. |
String |
toString()
|
Methods inherited from class org.apache.commons.jxpath.ri.compiler.Operation |
---|
computeContextDependent, getArguments |
Methods inherited from class org.apache.commons.jxpath.ri.compiler.Expression |
---|
isContextDependent, iterate, iteratePointers |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int OR_PRECEDENCE
protected static final int AND_PRECEDENCE
protected static final int COMPARE_PRECEDENCE
protected static final int RELATIONAL_EXPR_PRECEDENCE
protected static final int ADD_PRECEDENCE
protected static final int MULTIPLY_PRECEDENCE
protected static final int NEGATE_PRECEDENCE
protected static final int UNION_PRECEDENCE
Constructor Detail |
---|
public CoreOperation(Expression[] args)
args
- Expression[]Method Detail |
---|
public Object compute(EvalContext context)
Expression
compute
in class Expression
context
- evaluation context
public abstract Object computeValue(EvalContext context)
Expression
computeValue
in class Expression
context
- evaluation context
public abstract String getSymbol()
protected abstract boolean isSymmetric()
protected abstract int getPrecedence()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |