|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xpath.Expression org.apache.xpath.operations.Operation
public class Operation
The baseclass for a binary operation.
Nested Class Summary | |
---|---|
(package private) class |
Operation.LeftExprOwner
|
Field Summary | |
---|---|
protected Expression |
m_left
The left operand expression. |
protected Expression |
m_right
The right operand expression. |
(package private) static long |
serialVersionUID
|
Constructor Summary | |
---|---|
Operation()
|
Method Summary | |
---|---|
void |
callVisitors(ExpressionOwner owner,
XPathVisitor visitor)
This will traverse the heararchy, calling the visitor for each member. |
boolean |
canTraverseOutsideSubtree()
Tell if this expression or it's subexpressions can traverse outside the current subtree. |
boolean |
deepEquals(Expression expr)
Compare this object with another object and see if they are equal, include the sub heararchy. |
XObject |
execute(XPathContext xctxt)
Execute a binary operation by calling execute on each of the operands, and then calling the operate method on the derived class. |
void |
fixupVariables(java.util.Vector vars,
int globalsSize)
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. |
Expression |
getExpression()
Get the raw Expression object that this class wraps. |
Expression |
getLeftOperand()
|
Expression |
getRightOperand()
|
XObject |
operate(XObject left,
XObject right)
Apply the operation to two operands, and return the result. |
void |
setExpression(Expression exp)
Set the raw expression object for this object. |
void |
setLeftRight(Expression l,
Expression r)
Set the left and right operand expressions for this operation. |
Methods inherited from class org.apache.xpath.Expression |
---|
asIterator, asIteratorRaw, asNode, assertion, bool, error, execute, execute, execute, executeCharsToContentHandler, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isNodesetExpr, isSameClass, isStableNumber, num, warn, xstr |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
protected Expression m_left
protected Expression m_right
Constructor Detail |
---|
public Operation()
Method Detail |
---|
public void fixupVariables(java.util.Vector vars, int globalsSize)
fixupVariables
in class Expression
vars
- List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector from the start of the vector will be its position
in the stack frame (but variables above the globalsTop value will need
to be offset to the current stack frame).public boolean canTraverseOutsideSubtree()
canTraverseOutsideSubtree
in class Expression
public void setLeftRight(Expression l, Expression r)
l
- The left expression operand.r
- The right expression operand.public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
execute
in class Expression
xctxt
- The runtime execution context.
javax.xml.transform.TransformerException
public XObject operate(XObject left, XObject right) throws javax.xml.transform.TransformerException
left
- non-null reference to the evaluated left operand.right
- non-null reference to the evaluated right operand.
javax.xml.transform.TransformerException
public Expression getLeftOperand()
public Expression getRightOperand()
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
XPathVisitable
callVisitors
in interface XPathVisitable
owner
- The owner of the visitor, where that path may be
rewritten if needed.visitor
- The visitor whose appropriate method will be called.XPathVisitable.callVisitors(ExpressionOwner, XPathVisitor)
public Expression getExpression()
ExpressionOwner
getExpression
in interface ExpressionOwner
ExpressionOwner.getExpression()
public void setExpression(Expression exp)
ExpressionOwner
setExpression
in interface ExpressionOwner
exp
- the raw Expression object, which should not normally be null.ExpressionOwner.setExpression(Expression)
public boolean deepEquals(Expression expr)
Expression
deepEquals
in class Expression
expr
- Another expression object.
Expression.deepEquals(Expression)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |