APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xpath.internal.operations

public abstract Class UnaryOperation

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.Bool, com.sun.org.apache.xpath.internal.operations.Neg, com.sun.org.apache.xpath.internal.operations.Number, com.sun.org.apache.xpath.internal.operations.String
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 unary operation base class.

Field Summary

Modifier and TypeField and Description
protected Expression
m_right

The operand for the operation.

pack-priv static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
callVisitors(ExpressionOwner owner, XPathVisitor 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 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:

An XObject that represents the result of applying the unary operation to the evaluated operand.
execute
(XPathContext
The runtime execution context.
xctxt
)

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

Execute the operand and apply the unary operation to the result.

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
getOperand()

Returns: the operand of unary operation, as an Expression.

public abstract XObject

Returns:

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

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

public void
setExpression(Expression exp)

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

Set the raw expression object for this object.

public void
setRight(Expression
The expression operand to which the unary operation will be applied.
r
)

Set the expression operand for the operation.

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

Field Detail

m_rightback to summary
protected Expression m_right

The operand for the operation.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

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

Constructor Detail

UnaryOperationback to summary
public UnaryOperation()

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.

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.

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 the operand and apply the unary operation to the result.

Parameters
xctxt:XPathContext

The runtime execution context.

Returns:XObject

An XObject that represents the result of applying the unary operation to the evaluated operand.

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.

See Also
ExpressionOwner#getExpression()
getOperandback to summary
public Expression getOperand()
Returns:Expression

the operand of unary operation, as an Expression.

operateback to summary
public abstract XObject operate(XObject right) throws TransformerException

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

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

See Also
ExpressionOwner#setExpression(Expression)
setRightback to summary
public void setRight(Expression r)

Set the expression operand for the operation.

Parameters
r:Expression

The expression operand to which the unary operation will be applied.