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

public Class FunctionDef1Arg

extends FunctionOneArg
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xpath.internal.functions.FuncDoclocation, com.sun.org.apache.xpath.internal.functions.FuncGenerateId, com.sun.org.apache.xpath.internal.functions.FuncLocalPart, com.sun.org.apache.xpath.internal.functions.FuncNamespace, com.sun.org.apache.xpath.internal.functions.FuncNormalizeSpace, com.sun.org.apache.xpath.internal.functions.FuncNumber, com.sun.org.apache.xpath.internal.functions.FuncQname, com.sun.org.apache.xpath.internal.functions.FuncString, com.sun.org.apache.xpath.internal.functions.FuncStringLength
Imports
com.sun.org.apache.xalan.internal.res.XSLMessages, com.sun.org.apache.xml.internal.dtm.DTM, com.sun.org.apache.xml.internal.utils.XMLString, com.sun.org.apache.xpath.internal.XPathContext, com.sun.org.apache.xpath.internal.objects.XString, com.sun.org.apache.xpath.internal.res.XPATHErrorResources

Base class for functions that accept one argument that can be defaulted if not specified.

Field Summary

Modifier and TypeField and Description
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 boolean

Returns:

true if the expression can be represented as a nodeset.
Arg0IsNodesetExpr
()

Tell if the expression is a nodeset expression.

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.

protected int

Returns:

The first node of the executed nodeset, or the current context node if the first argument is null.
getArg0AsNode
(XPathContext
Runtime XPath context.
xctxt
)

Execute the first argument expression that is expected to return a nodeset.

protected double

Returns:

The number value of the first argument, or the number value of the current context node if the first argument is null.
getArg0AsNumber
(XPathContext
Runtime XPath context.
xctxt
)

Execute the first argument expression that is expected to return a number.

protected XMLString

Returns:

The string value of the first argument, or the string value of the current context node if the first argument is null.
getArg0AsString
(XPathContext
Runtime XPath context.
xctxt
)

Execute the first argument expression that is expected to return a string.

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.

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

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

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

Constructor Detail

FunctionDef1Argback to summary
public FunctionDef1Arg()

Method Detail

Arg0IsNodesetExprback to summary
public boolean Arg0IsNodesetExpr()

Tell if the expression is a nodeset expression.

Returns:boolean

true if the expression can be represented as a nodeset.

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.

Exceptions
WrongNumberArgsException:
if the number of arguments is not 0 or 1.
getArg0AsNodeback to summary
protected int getArg0AsNode(XPathContext xctxt) throws TransformerException

Execute the first argument expression that is expected to return a nodeset. If the argument is null, then return the current context node.

Parameters
xctxt:XPathContext

Runtime XPath context.

Returns:int

The first node of the executed nodeset, or the current context node if the first argument is null.

Exceptions
TransformerException:
if an error occurs while executing the argument expression.
getArg0AsNumberback to summary
protected double getArg0AsNumber(XPathContext xctxt) throws TransformerException

Execute the first argument expression that is expected to return a number. If the argument is null, then get the number value from the current context node.

Parameters
xctxt:XPathContext

Runtime XPath context.

Returns:double

The number value of the first argument, or the number value of the current context node if the first argument is null.

Exceptions
TransformerException:
if an error occurs while executing the argument expression.
getArg0AsStringback to summary
protected XMLString getArg0AsString(XPathContext xctxt) throws TransformerException

Execute the first argument expression that is expected to return a string. If the argument is null, then get the string value from the current context node.

Parameters
xctxt:XPathContext

Runtime XPath context.

Returns:XMLString

The string value of the first argument, or the string value of the current context node if the first argument is null.

Exceptions
TransformerException:
if an error occurs while executing the argument expression.
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.