org.apache.commons.jxpath.ri.compiler
Class Path
java.lang.Object
|
+--org.apache.commons.jxpath.ri.compiler.Expression
|
+--org.apache.commons.jxpath.ri.compiler.Path
- Direct Known Subclasses:
- ExpressionPath, LocationPath
- public abstract class Path
- extends Expression
- Version:
- $Revision: 1.4 $ $Date: 2002/05/08 00:39:59 $
- Author:
- Dmitri Plotnikov
Fields inherited from class org.apache.commons.jxpath.ri.compiler.Expression |
NaN, ONE, OP_AND, OP_CONSTANT, OP_CORE_FUNCTION, OP_DIV, OP_EQ, OP_EXPRESSION_PATH, OP_FUNCTION, OP_GT, OP_GTE, OP_KEY_LOOKUP, OP_LOCATION_PATH, OP_LT, OP_LTE, OP_MINUS, OP_MOD, OP_MULT, OP_NE, OP_OR, OP_STEP, OP_SUM, OP_UNARY_MINUS, OP_UNION, OP_VAR, ZERO |
Constructor Summary |
Path(int typeCode,
Step[] steps)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BASIC_PATH_HINT
public static final java.lang.String BASIC_PATH_HINT
- See Also:
- Constant Field Values
Path
public Path(int typeCode,
Step[] steps)
getSteps
public Step[] getSteps()
computeContextDependent
public boolean computeContextDependent()
- Description copied from class:
Expression
- Implemented by subclasses and result is cached by isContextDependent()
- Specified by:
computeContextDependent
in class Expression
isSimplePath
public boolean isSimplePath()
- Recognized paths formatted as
foo/bar[3]/baz[@name = 'biz']
. The
evaluation of such "simple" paths is optimized and streamlined.
areBasicPredicates
protected boolean areBasicPredicates(Expression[] predicates)
getSingleNodePointerForSteps
protected Pointer getSingleNodePointerForSteps(EvalContext context)
- Given a root context, walks a path therefrom and finds the
pointer to the first element matching the path.
evalSteps
protected EvalContext evalSteps(EvalContext context)
- Given a root context, walks a path therefrom and builds a context
that contains all nodes matching the path.
createContextForStep
protected EvalContext createContextForStep(EvalContext context,
int axis,
NodeTest nodeTest)
- Different axes are serviced by different contexts. This method
allocates the right context for the supplied step.
Copyright (c) 2001 - Apache Software Foundation