public class RootContext extends EvalContext
Modifier and Type | Field and Description |
---|---|
private int |
availableRegister |
private JXPathContextReferenceImpl |
jxpathContext |
private static int |
MAX_REGISTER |
private NodePointer |
pointer |
private java.lang.Object[] |
registers |
static java.lang.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(java.lang.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,
java.lang.Object[] parameters)
Get the specified function from the context.
|
JXPathContext |
getJXPathContext()
Get the JXPathContext in which this function is being evaluated.
|
java.lang.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.
|
java.lang.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(java.lang.Object value)
Set the next registered value.
|
java.lang.String |
toString() |
getContextNodeList, getContextNodePointer, getDocumentOrder, getNodeSet, getPosition, getSingleNodePointer, hasNext, isChildOrderingRequired, next, remove, reset, sortPointers
private JXPathContextReferenceImpl jxpathContext
private NodePointer pointer
private java.lang.Object[] registers
private int availableRegister
public static final java.lang.Object UNKNOWN_VALUE
private static final int MAX_REGISTER
public RootContext(JXPathContextReferenceImpl jxpathContext, NodePointer pointer)
jxpathContext
- contextpointer
- pointerpublic JXPathContext getJXPathContext()
ExpressionContext
getJXPathContext
in interface ExpressionContext
getJXPathContext
in class EvalContext
public RootContext getRootContext()
EvalContext
getRootContext
in class EvalContext
public EvalContext getAbsoluteRootContext()
public NodePointer getCurrentNodePointer()
EvalContext
getCurrentNodePointer
in class EvalContext
public java.lang.Object getValue()
EvalContext
getValue
in class EvalContext
public int getCurrentPosition()
EvalContext
getCurrentPosition
in class EvalContext
public boolean nextNode()
EvalContext
nextNode
in class EvalContext
public boolean nextSet()
EvalContext
nextSet
in class EvalContext
public boolean setPosition(int position)
EvalContext
setPosition
in class EvalContext
position
- to setpublic EvalContext getConstantContext(java.lang.Object constant)
constant
- objectpublic EvalContext getVariableContext(QName variableName)
variableName
- variable namepublic Function getFunction(QName functionName, java.lang.Object[] parameters)
functionName
- QNameparameters
- Object[]public java.lang.Object getRegisteredValue(int id)
id
- intpublic int setRegisteredValue(java.lang.Object value)
value
- Objectpublic java.lang.String toString()
toString
in class EvalContext