Top Description Inners Fields Constructors Methods
com.sun.org.apache.xpath.internal.operations

public Class Operation

extends Expression
implements ExpressionOwner
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xpath.internal.ExpressionOwner
Known Direct Subclasses
com.sun.org.apache.xpath.internal.operations.Or, com.sun.org.apache.xpath.internal.operations.Plus, com.sun.org.apache.xpath.internal.operations.Quo, com.sun.org.apache.xpath.internal.operations.And, com.sun.org.apache.xpath.internal.operations.Div, com.sun.org.apache.xpath.internal.operations.Equals, com.sun.org.apache.xpath.internal.operations.Gt, com.sun.org.apache.xpath.internal.operations.Gte, com.sun.org.apache.xpath.internal.operations.Lt, com.sun.org.apache.xpath.internal.operations.Lte, com.sun.org.apache.xpath.internal.operations.Minus, com.sun.org.apache.xpath.internal.operations.Mod, com.sun.org.apache.xpath.internal.operations.Mult, com.sun.org.apache.xpath.internal.operations.NotEquals
Imports
com.sun.org.apache.xml.internal.utils.QName, com.sun.org.apache.xpath.internal.Expression, .ExpressionOwner, .XPathContext, .XPathVisitor, com.sun.org.apache.xpath.internal.objects.XObject, java.util.List

The baseclass for a binary operation.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
protected Expression
m_left

The left operand expression.

protected Expression
m_right

The right operand expression.

pack-priv static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
callVisitors(ExpressionOwner
The owner of the visitor, where that path may be rewritten if needed.
owner
,
XPathVisitor
The visitor whose appropriate method will be called.
visitor
)

Implements com.sun.org.apache.xpath.internal.XPathVisitable.callVisitors.

This will traverse the heararchy, calling the visitor for each member.

public boolean

Returns:

true if traversal outside the context node's subtree can occur.
canTraverseOutsideSubtree
()

Overrides com.sun.org.apache.xpath.internal.Expression.canTraverseOutsideSubtree.

Tell if this expression or it's subexpressions can traverse outside the current subtree.

public boolean
deepEquals(Expression
Another expression object.
expr
)

Implements abstract com.sun.org.apache.xpath.internal.Expression.deepEquals.

Compare this object with another object and see if they are equal, include the sub heararchy.

public XObject

Returns:

The XObject result of the operation.
execute
(XPathContext
The runtime execution context.
xctxt
)

Implements abstract com.sun.org.apache.xpath.internal.Expression.execute.

Execute a binary operation by calling execute on each of the operands, and then calling the operate method on the derived class.

public void
fixupVariables(List<QName>
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).
vars
,
int globalsSize)

Implements abstract com.sun.org.apache.xpath.internal.Expression.fixupVariables.

This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.

public Expression
getExpression()

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Get the raw Expression object that this class wraps.

public Expression

Returns:

the left operand of binary operation, as an Expression.
getLeftOperand
()

public Expression

Returns:

the right operand of binary operation, as an Expression.
getRightOperand
()

public XObject

Returns:

non-null reference to the XObject that represents the result of the operation.
operate
(XObject
non-null reference to the evaluated left operand.
left
,
XObject
non-null reference to the evaluated right operand.
right
)

Apply the operation to two operands, and return the result.

public void
setExpression(Expression
the raw Expression object, which should not normally be null.
exp
)

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Set the raw expression object for this object.

public void
setLeftRight(Expression
The left expression operand.
l
,
Expression
The right expression operand.
r
)

Set the left and right operand expressions for this operation.

Inherited from com.sun.org.apache.xpath.internal.Expression:
asIteratorasIteratorRawasNodeassertionboolerrorexecuteexecuteexecuteexecuteCharsToContentHandlerexprAddChildexprGetChildexprGetNumChildrenexprGetParentexprSetParentgetColumnNumbergetExpressionOwnergetLineNumbergetPublicIdgetSystemIdisNodesetExprisSameClassisStableNumbernumwarnxstr

Field Detail

m_leftback to summary
protected Expression m_left

The left operand expression.

m_rightback to summary
protected Expression m_right

The right operand expression.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xpath.internal.Expression.serialVersionUID.

Constructor Detail

Operationback to summary
public Operation()

Method Detail

callVisitorsback to summary
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)

Implements com.sun.org.apache.xpath.internal.XPathVisitable.callVisitors.

Doc from com.sun.org.apache.xpath.internal.XPathVisitable.callVisitors.

This will traverse the heararchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.

Parameters
owner:ExpressionOwner

The owner of the visitor, where that path may be rewritten if needed.

visitor:XPathVisitor

The visitor whose appropriate method will be called.

See Also
com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
canTraverseOutsideSubtreeback to summary
public boolean canTraverseOutsideSubtree()

Overrides com.sun.org.apache.xpath.internal.Expression.canTraverseOutsideSubtree.

Tell if this expression or it's subexpressions can traverse outside the current subtree.

Returns:boolean

true if traversal outside the context node's subtree can occur.

deepEqualsback to summary
public boolean deepEquals(Expression expr)

Implements abstract com.sun.org.apache.xpath.internal.Expression.deepEquals.

Doc from com.sun.org.apache.xpath.internal.Expression.deepEquals.

Compare this object with another object and see if they are equal, include the sub heararchy.

Parameters
expr:Expression

Another expression object.

Returns:boolean

true if this objects class and the expr object's class are the same, and the data contained within both objects are considered equal.

See Also
Expression#deepEquals(Expression)
executeback to summary
public XObject execute(XPathContext xctxt) throws TransformerException

Implements abstract com.sun.org.apache.xpath.internal.Expression.execute.

Execute a binary operation by calling execute on each of the operands, and then calling the operate method on the derived class.

Parameters
xctxt:XPathContext

The runtime execution context.

Returns:XObject

The XObject result of the operation.

Exceptions
TransformerException:

Doc from com.sun.org.apache.xpath.internal.Expression.execute.

if a runtime exception occurs.

fixupVariablesback to summary
public void fixupVariables(List<QName> vars, int globalsSize)

Implements abstract com.sun.org.apache.xpath.internal.Expression.fixupVariables.

This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.

Parameters
vars:List<QName>

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).

getExpressionback to summary
public Expression getExpression()

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Doc from com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Get the raw Expression object that this class wraps.

Returns:Expression

the raw Expression object, which should not normally be null.

See Also
ExpressionOwner#getExpression()
getLeftOperandback to summary
public Expression getLeftOperand()
Returns:Expression

the left operand of binary operation, as an Expression.

getRightOperandback to summary
public Expression getRightOperand()
Returns:Expression

the right operand of binary operation, as an Expression.

operateback to summary
public XObject operate(XObject left, XObject right) throws TransformerException

Apply the operation to two operands, and return the result.

Parameters
left:XObject

non-null reference to the evaluated left operand.

right:XObject

non-null reference to the evaluated right operand.

Returns:XObject

non-null reference to the XObject that represents the result of the operation.

setExpressionback to summary
public void setExpression(Expression exp)

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Doc from com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Set the raw expression object for this object.

Parameters
exp:Expression

the raw Expression object, which should not normally be null.

See Also
ExpressionOwner#setExpression(Expression)
setLeftRightback to summary
public void setLeftRight(Expression l, Expression r)

Set the left and right operand expressions for this operation.

Parameters
l:Expression

The left expression operand.

r:Expression

The right expression operand.

com.sun.org.apache.xpath.internal.operations back to summary

pack-priv Class Operation.LeftExprOwner

extends Object
implements ExpressionOwner
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xpath.internal.operations.Operation.LeftExprOwner
All Implemented Interfaces
com.sun.org.apache.xpath.internal.ExpressionOwner

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Expression
getExpression()

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Get the raw Expression object that this class wraps.

public void
setExpression(Expression
the raw Expression object, which should not normally be null.
exp
)

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Set the raw expression object for this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LeftExprOwnerback to summary
pack-priv LeftExprOwner()

Method Detail

getExpressionback to summary
public Expression getExpression()

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Doc from com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Get the raw Expression object that this class wraps.

Returns:Expression

the raw Expression object, which should not normally be null.

See Also
ExpressionOwner#getExpression()
setExpressionback to summary
public void setExpression(Expression exp)

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Doc from com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Set the raw expression object for this object.

Parameters
exp:Expression

the raw Expression object, which should not normally be null.

See Also
ExpressionOwner#setExpression(Expression)