net.sf.saxon.expr
public class Optimizer extends Object implements Serializable
| Field Summary | |
|---|---|
| protected Configuration | config |
| Constructor Summary | |
|---|---|
| Optimizer(Configuration config) | |
| Method Summary | |
|---|---|
| Expression | convertPathExpressionToKey(PathExpression pathExp, StaticContext env)
Examine a path expression to see whether it can be replaced by a call on the key() function;
if so, generate an appropriate key definition and return the call on key(). |
| FilterExpression | convertToFilterExpression(PathExpression pathExp, TypeHierarchy th)
Convert a path expression such as a/b/c[predicate] into a filter expression
of the form (a/b/c)[predicate]. |
| Configuration | getConfiguration() |
| int | isIndexableFilter(Expression filter)
Test whether a filter predicate is indexable. |
| Closure | makeClosure(Expression expression, int ref)
Make a Closure, given the expected reference count |
| BinaryExpression | makeGeneralComparison(Expression p0, int op, Expression p1, boolean backwardsCompatible)
Create a GeneralComparison expression |
| Expression | optimizeCopy(Expression select)
Attempt to optimize a copy operation. |
| SequenceIterator | tryIndexedFilter(ValueRepresentation startValue, Expression filter, int isIndexable, XPathContext context) |
Parameters: pathExp The path expression to be converted.
Parameters: pathExp the path expression to be converted
Returns: the resulting filterexpression if conversion is possible, or null if not
Parameters: filter the predicate expression
Returns: 0 if not indexable; +1 if the predicate is in the form expression=value; -1 if it is in the form value=expression
Parameters: select the expression that selects the items to be copied
Returns: null if no optimization is possible, or an expression that does an optimized copy of these items otherwise