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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckNumberArgs(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 voidConstructs 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, setArgMethods inherited from class org.loboevolution.apache.xpath.functions.Function
callVisitors, postCompileStepMethods 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:
executein 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:
checkNumberArgsin 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:
reportWrongNumberArgsin classFunction3Args- Throws:
WrongNumberArgsException- if any
-