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

public Class Function2Args

extends FunctionOneArg
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xpath.internal.functions.Function3Args, com.sun.org.apache.xpath.internal.functions.FuncContains, com.sun.org.apache.xpath.internal.functions.FuncStartsWith, com.sun.org.apache.xpath.internal.functions.FuncSubstringAfter, com.sun.org.apache.xpath.internal.functions.FuncSubstringBefore
Imports
com.sun.org.apache.xalan.internal.res.XSLMessages, com.sun.org.apache.xml.internal.utils.QName, com.sun.org.apache.xpath.internal.Expression, .ExpressionOwner, .XPathVisitor, java.util.List

Base class for functions that accept two arguments.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv Expression
m_arg1

The second argument passed to the function (at index 1).

pack-priv static final long
Inherited from com.sun.org.apache.xpath.internal.functions.FunctionOneArg:
m_arg0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
callArgVisitors(XPathVisitor visitor)

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.callArgVisitors.

Call the visitors for the function arguments.

public boolean

Returns:

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

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.canTraverseOutsideSubtree.

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

public void
checkNumberArgs(int
The number of arguments that is being passed to the function.
argNum
)

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.checkNumberArgs.

Check that the number of arguments passed to this function is correct.

public boolean
deepEquals(Expression
Another expression object.
expr
)

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.deepEquals.

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

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)

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.fixupVariables.

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

public Expression

Returns:

An expression that represents the second argument passed to the function.
getArg1
()

Return the second argument passed to the function (at index 1).

protected void
reportWrongNumberArgs()

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.reportWrongNumberArgs.

Constructs and throws a WrongNumberArgException with the appropriate message for this function object.

public void
setArg(Expression
non-null expression that represents the argument.
arg
,
int
The argument number index.
argNum
)

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.setArg.

Set an argument expression for a function.

Inherited from com.sun.org.apache.xpath.internal.functions.FunctionOneArg:
getArg0getExpressionsetExpression

Field Detail

m_arg1back to summary
pack-priv Expression m_arg1

The second argument passed to the function (at index 1).

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.serialVersionUID.

Constructor Detail

Function2Argsback to summary
public Function2Args()

Method Detail

callArgVisitorsback to summary
public void callArgVisitors(XPathVisitor visitor)

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.callArgVisitors.

Doc from com.sun.org.apache.xpath.internal.functions.Function.callArgVisitors.

Call the visitors for the function arguments.

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.functions.FunctionOneArg.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.

checkNumberArgsback to summary
public void checkNumberArgs(int argNum) throws WrongNumberArgsException

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.checkNumberArgs.

Check that the number of arguments passed to this function is correct.

Parameters
argNum:int

The number of arguments that is being passed to the function.

deepEqualsback to summary
public boolean deepEquals(Expression expr)

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.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)
fixupVariablesback to summary
public void fixupVariables(List<QName> vars, int globalsSize)

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.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).

getArg1back to summary
public Expression getArg1()

Return the second argument passed to the function (at index 1).

Returns:Expression

An expression that represents the second argument passed to the function.

reportWrongNumberArgsback to summary
protected void reportWrongNumberArgs() throws WrongNumberArgsException

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.reportWrongNumberArgs.

Constructs and throws a WrongNumberArgException with the appropriate message for this function object.

setArgback to summary
public void setArg(Expression arg, int argNum) throws WrongNumberArgsException

Overrides com.sun.org.apache.xpath.internal.functions.FunctionOneArg.setArg.

Set an argument expression for a function. This method is called by the XPath compiler.

Parameters
arg:Expression

non-null expression that represents the argument.

argNum:int

The argument number index.

Exceptions
WrongNumberArgsException:
If the argNum parameter is greater than 1.
com.sun.org.apache.xpath.internal.functions back to summary

pack-priv Class Function2Args.Arg1Owner

extends Object
implements ExpressionOwner
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xpath.internal.functions.Function2Args.Arg1Owner
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

Arg1Ownerback to summary
pack-priv Arg1Owner()

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)