Package org.htmlunit.xpath.functions
Class FuncSubstring
- java.lang.Object
-
- All Implemented Interfaces:
javax.xml.transform.SourceLocator
,ExpressionNode
,XPathVisitable
public class FuncSubstring extends Function3Args
Execute the Substring() function.
-
-
Field Summary
-
Fields inherited from class org.htmlunit.xpath.functions.Function3Args
arg2_
-
Fields inherited from class org.htmlunit.xpath.functions.Function2Args
m_arg1
-
Fields inherited from class org.htmlunit.xpath.functions.FunctionOneArg
m_arg0
-
-
Constructor Summary
Constructors Constructor Description FuncSubstring()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkNumberArgs(int argNum)
Check that the number of arguments passed to this function is correct.XObject
execute(XPathContext xctxt)
Execute an expression in the XPath runtime context, and return the result of the expression.protected void
reportWrongNumberArgs()
Constructs and throws a WrongNumberArgException with the appropriate message for this function object.-
Methods inherited from class org.htmlunit.xpath.functions.Function3Args
callArgVisitors, canTraverseOutsideSubtree, deepEquals, setArg
-
Methods inherited from class org.htmlunit.xpath.functions.Function
callVisitors, postCompileStep
-
Methods inherited from class org.htmlunit.xpath.Expression
asIterator, asNode, assertion, bool, error, execute, execute, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num
-
-
-
-
Method Detail
-
execute
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
Execute an expression in the XPath runtime context, and return the result of the expression.
-
checkNumberArgs
public void checkNumberArgs(int argNum) throws WrongNumberArgsException
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
protected void reportWrongNumberArgs() throws WrongNumberArgsException
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
-
-