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

public Class FuncLast

extends Function
Class Inheritance
Imports
com.sun.org.apache.xml.internal.dtm.DTMIterator, com.sun.org.apache.xml.internal.utils.QName, com.sun.org.apache.xpath.internal.XPathContext, com.sun.org.apache.xpath.internal.axes.SubContextList, com.sun.org.apache.xpath.internal.compiler.Compiler, com.sun.org.apache.xpath.internal.objects.XNumber, .XObject, java.util.List

Execute the Last() function.

Field Summary

Modifier and TypeField and Description
private boolean
pack-priv static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public XObject

Returns:

A valid XObject.
execute
(XPathContext
The current execution context.
xctxt
)

Overrides com.sun.org.apache.xpath.internal.functions.Function.execute.

Execute the function.

public void
fixupVariables(List<QName> vars, int globalsSize)

Implements abstract com.sun.org.apache.xpath.internal.Expression.fixupVariables.

No arguments to process, so this does nothing.

public int

Returns:

The number of nodes in the list.
getCountOfContextNodeList
(XPathContext
non-null reference to XPath runtime context.
xctxt
)

Get the position in the current context node list.

public void
postCompileStep(Compiler compiler)

Overrides com.sun.org.apache.xpath.internal.functions.Function.postCompileStep.

Figure out if we're executing a toplevel expression.

Inherited from com.sun.org.apache.xpath.internal.functions.Function:
callArgVisitorscallVisitorscheckNumberArgsdeepEqualsreportWrongNumberArgssetArg

Field Detail

m_isTopLevelback to summary
private boolean m_isTopLevel
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

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

Constructor Detail

FuncLastback to summary
public FuncLast()

Method Detail

executeback to summary
public XObject execute(XPathContext xctxt) throws TransformerException

Overrides com.sun.org.apache.xpath.internal.functions.Function.execute.

Execute the function. The function must return a valid object.

Parameters
xctxt:XPathContext

The current execution context.

Returns:XObject

A valid XObject.

Exceptions
TransformerException:

Doc from com.sun.org.apache.xpath.internal.Expression.execute.

if a runtime exception occurs.

fixupVariablesback to summary
public void fixupVariables(List<QName> vars, int globalsSize)

Implements abstract com.sun.org.apache.xpath.internal.Expression.fixupVariables.

No arguments to process, so this does nothing.

getCountOfContextNodeListback to summary
public int getCountOfContextNodeList(XPathContext xctxt) throws TransformerException

Get the position in the current context node list.

Parameters
xctxt:XPathContext

non-null reference to XPath runtime context.

Returns:int

The number of nodes in the list.

postCompileStepback to summary
public void postCompileStep(Compiler compiler)

Overrides com.sun.org.apache.xpath.internal.functions.Function.postCompileStep.

Figure out if we're executing a toplevel expression. If so, we can't be inside of a predicate.