Class FuncSubstring
java.lang.Object
org.loboevolution.apache.xpath.Expression
org.loboevolution.apache.xpath.functions.Function
org.loboevolution.apache.xpath.functions.FunctionOneArg
org.loboevolution.apache.xpath.functions.Function2Args
org.loboevolution.apache.xpath.functions.Function3Args
org.loboevolution.apache.xpath.functions.FuncSubstring
- All Implemented Interfaces:
SourceLocator
,ExpressionNode
,XPathVisitable
Execute the Substring() function.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkNumberArgs
(int argNum) Check that the number of arguments passed to this function is correct.execute
(XPathContext xctxt) Execute an expression in the XPath runtime context, and return the result of the expression.protected void
Constructs and throws a WrongNumberArgException with the appropriate message for this function object.Methods inherited from class org.loboevolution.apache.xpath.functions.Function3Args
callArgVisitors, canTraverseOutsideSubtree, deepEquals, setArg
Methods inherited from class org.loboevolution.apache.xpath.functions.Function
callVisitors, postCompileStep
Methods inherited from class org.loboevolution.apache.xpath.Expression
asIterator, asNode, assertion, bool, error, execute, execute, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num
-
Constructor Details
-
FuncSubstring
public FuncSubstring()
-
-
Method Details
-
execute
Execute an expression in the XPath runtime context, and return the result of the expression.- Overrides:
execute
in classFunction
- Parameters:
xctxt
- The XPath runtime context.- Returns:
- The result of the expression in the form of a
XObject
. - Throws:
TransformerException
- if a runtime exception occurs.
-
checkNumberArgs
Check that the number of arguments passed to this function is correct. This method is meant to be overloaded by derived classes, to check for the number of arguments for a specific function type. This method is called by the compiler for static number of arguments checking.- Overrides:
checkNumberArgs
in classFunction3Args
- Parameters:
argNum
- The number of arguments that is being passed to the function.- Throws:
WrongNumberArgsException
- if any
-
reportWrongNumberArgs
Constructs and throws a WrongNumberArgException with the appropriate message for this function object. This method is meant to be overloaded by derived classes so that the message will be as specific as possible.- Overrides:
reportWrongNumberArgs
in classFunction3Args
- Throws:
WrongNumberArgsException
- if any
-