public class RootContext extends EvalContext
| Modifier and Type | Field and Description |
|---|---|
static Object |
UNKNOWN_VALUE |
parentContext, position, rootContext| Constructor and Description |
|---|
RootContext(JXPathContextReferenceImpl jxpathContext,
NodePointer pointer)
Create a new RootContext.
|
| Modifier and Type | Method and Description |
|---|---|
EvalContext |
getAbsoluteRootContext()
Get absolute root context
|
EvalContext |
getConstantContext(Object constant)
Get a context that points to the specified object.
|
NodePointer |
getCurrentNodePointer()
Returns the current context node.
|
int |
getCurrentPosition()
Get the current position.
|
Function |
getFunction(QName functionName,
Object[] parameters)
Get the specified function from the context.
|
JXPathContext |
getJXPathContext()
Get the JXPathContext in which this function is being evaluated.
|
Object |
getRegisteredValue(int id)
Get a registered value.
|
RootContext |
getRootContext()
Returns the root context of the path, which provides easy
access to variables and functions.
|
Object |
getValue()
Typically returns the NodeSet by calling getNodeSet(),
but will be overridden for contexts that more naturally produce
individual values, e.g.
|
EvalContext |
getVariableContext(QName variableName)
Get variable context.
|
boolean |
nextNode()
Returns true if there is another object in the current set.
|
boolean |
nextSet()
Returns true if there is another sets of objects to interate over.
|
boolean |
setPosition(int position)
Moves the current position to the specified index.
|
int |
setRegisteredValue(Object value)
Set the next registered value.
|
String |
toString() |
getContextNodeList, getContextNodePointer, getDocumentOrder, getNodeSet, getPosition, getSingleNodePointer, hasNext, isChildOrderingRequired, next, remove, reset, sortPointerspublic static final Object UNKNOWN_VALUE
public RootContext(JXPathContextReferenceImpl jxpathContext, NodePointer pointer)
jxpathContext - contextpointer - pointerpublic JXPathContext getJXPathContext()
ExpressionContextgetJXPathContext in interface ExpressionContextgetJXPathContext in class EvalContextpublic RootContext getRootContext()
EvalContextgetRootContext in class EvalContextpublic EvalContext getAbsoluteRootContext()
public NodePointer getCurrentNodePointer()
EvalContextgetCurrentNodePointer in class EvalContextpublic Object getValue()
EvalContextgetValue in class EvalContextpublic int getCurrentPosition()
EvalContextgetCurrentPosition in class EvalContextpublic boolean nextNode()
EvalContextnextNode in class EvalContextpublic boolean nextSet()
EvalContextnextSet in class EvalContextpublic boolean setPosition(int position)
EvalContextsetPosition in class EvalContextposition - to setpublic EvalContext getConstantContext(Object constant)
constant - objectpublic EvalContext getVariableContext(QName variableName)
variableName - variable namepublic Function getFunction(QName functionName, Object[] parameters)
functionName - QNameparameters - Object[]public Object getRegisteredValue(int id)
id - intpublic int setRegisteredValue(Object value)
value - Objectpublic String toString()
toString in class EvalContextCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.