Package org.htmlunit.xpath.functions
Class FuncLast
- java.lang.Object
-
- org.htmlunit.xpath.Expression
-
- org.htmlunit.xpath.functions.Function
-
- org.htmlunit.xpath.functions.FuncLast
-
- All Implemented Interfaces:
javax.xml.transform.SourceLocator,ExpressionNode,XPathVisitable
public class FuncLast extends Function
Execute the Last() function.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanm_isTopLevel
-
Constructor Summary
Constructors Constructor Description FuncLast()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XObjectexecute(XPathContext xctxt)Execute an expression in the XPath runtime context, and return the result of the expression.intgetCountOfContextNodeList(XPathContext xctxt)Get the position in the current context node list.voidpostCompileStep(Compiler compiler)This function is currently only being used by Position() and Last().-
Methods inherited from class org.htmlunit.xpath.functions.Function
callArgVisitors, callVisitors, checkNumberArgs, deepEquals, reportWrongNumberArgs, setArg
-
Methods inherited from class org.htmlunit.xpath.Expression
asIterator, asNode, assertion, bool, canTraverseOutsideSubtree, error, execute, execute, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num
-
-
-
-
Method Detail
-
postCompileStep
public void postCompileStep(Compiler compiler)
This function is currently only being used by Position() and Last(). See respective functions for more detail.- Overrides:
postCompileStepin classFunction
-
getCountOfContextNodeList
public int getCountOfContextNodeList(XPathContext xctxt) throws javax.xml.transform.TransformerException
Get the position in the current context node list.- Parameters:
xctxt- non-null reference to XPath runtime context.- Returns:
- The number of nodes in the list.
- Throws:
javax.xml.transform.TransformerException- in case of error
-
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.
-
-