jd.xml.xpath.expr.path
Class RootPath

java.lang.Object
  extended byjd.xml.xpath.expr.ExpressionImpl
      extended byjd.xml.xpath.expr.NodeSetExpression
          extended byjd.xml.xpath.expr.path.LocationStep
              extended byjd.xml.xpath.expr.path.SimpleLocationStep
                  extended byjd.xml.xpath.expr.path.RootPath
All Implemented Interfaces:
Expression

public class RootPath
extends SimpleLocationStep

The RootPath represents the path expression "/". RootPath is derived from SimpleLocationStep to take advantage of chaining LocationSteps.


Field Summary
static RootPath INSTANCE
          The RootPath instance.
 
Fields inherited from class jd.xml.xpath.expr.path.LocationStep
axis_, maxAxisResultSize_, nodeTest_
 
Fields inherited from interface jd.xml.xpath.expr.Expression
DEP_CONTEXT_NODE, DEP_CONTEXT_POSITION, DEP_CONTEXT_SIZE, DEP_CONTEXT_STATIC, DEP_NONE, DEP_UNKNOWN
 
Method Summary
 void accept(ExpressionVisitor visitor)
          Accept a ExpressionVisitor.
 void getNodes(XPathContext context, XMutableNodeSet nodeSet)
          Evaluate the LocationStep.
 XPathNode toNode(XPathContext context)
          Evaluate the Expression to a XPathNode.
 XObject toXObject(XPathContext context, int nodeSetHint)
          Return a nodeset containing the root.
 
Methods inherited from class jd.xml.xpath.expr.path.SimpleLocationStep
canCreateModelWalker, getMinResultSize, getModelWalker, toBooleanValue, toNodeSet, toNumberValue, toStringValue
 
Methods inherited from class jd.xml.xpath.expr.path.LocationStep
getAxis, getContextDependencies, getMaxResultSize, getNodeTest
 
Methods inherited from class jd.xml.xpath.expr.NodeSetExpression
getMaxResultSize, getMinResultSize, getResultType, toXObject
 
Methods inherited from class jd.xml.xpath.expr.ExpressionImpl
hasContextDependencies, isUniqueFilter, matchesFilter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final RootPath INSTANCE
The RootPath instance.

Method Detail

toXObject

public XObject toXObject(XPathContext context,
                         int nodeSetHint)
Return a nodeset containing the root.


toNode

public XPathNode toNode(XPathContext context)
Evaluate the Expression to a XPathNode.

Specified by:
toNode in interface Expression
Overrides:
toNode in class SimpleLocationStep

getNodes

public void getNodes(XPathContext context,
                     XMutableNodeSet nodeSet)
Evaluate the LocationStep.

Overrides:
getNodes in class SimpleLocationStep
Parameters:
context - the evaluation context
nodeSet - a NodeSet where to store the resulting nodes

accept

public void accept(ExpressionVisitor visitor)
Description copied from interface: Expression
Accept a ExpressionVisitor.

Specified by:
accept in interface Expression
Overrides:
accept in class LocationStep