public class RootExpression extends SingletonExpression
staticContext
Constructor and Description |
---|
RootExpression() |
Modifier and Type | Method and Description |
---|---|
void |
display(int level)
Diagnostic print of expression structure
|
boolean |
evaluateAsBoolean(Context context)
Evaluate as a boolean.
|
String |
evaluateAsString(Context context)
Evaluate as a string
|
int |
getDependencies()
Determine which aspects of the context the expression depends on.
|
NodeInfo |
getNode(Context context)
Return the first element selected by this Expression
|
Expression |
reduce(int dependencies,
Context context)
Perform a partial evaluation of the expression, by eliminating specified dependencies
on the context.
|
Expression |
simplify()
Simplify an expression
|
enumerate, evaluateAsNodeSet, isContextDocumentNodeSet, selectFirst
evaluate, getDataType, outputStringValue
containsReferences, evaluateAsNumber, getStaticContext, indent, make, setStaticContext, usesCurrent
public Expression simplify() throws XPathException
simplify
in class Expression
XPathException
public NodeInfo getNode(Context context) throws XPathException
getNode
in class SingletonExpression
context
- The evaluation contextXPathException
public String evaluateAsString(Context context) throws XPathException
evaluateAsString
in class SingletonExpression
context
- The context for evaluationXPathException
public boolean evaluateAsBoolean(Context context) throws XPathException
evaluateAsBoolean
in class SingletonExpression
context
- The context (not used)XPathException
public int getDependencies()
getDependencies
in class Expression
public Expression reduce(int dependencies, Context context) throws XPathException
reduce
in class Expression
dependencies
- The dependencies to be removedcontext
- The context to be used for the partial evaluationXPathException
public void display(int level)
display
in class Expression