| 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.sf.saxon.expr.Optimizer
public class Optimizer
This class doesn't actually do any optimization itself, despite the name. Rather, it is intended to act as a factory for implementation classes that perform optimization, so that the appropriate level of optimization can be selected.
| 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.  | 
 Value | 
makeClosure(Expression expression,
            int ref,
            XPathContext context)
Make a Closure, given the expected reference count  | 
 BinaryExpression | 
makeGeneralComparison(Expression p0,
                      int op,
                      Expression p1,
                      boolean backwardsCompatible)
Create a GeneralComparison expression  | 
 ValueRepresentation | 
makeIndexedValue(SequenceIterator iter)
Create an indexed value  | 
 Expression | 
optimizeCopy(Expression select)
Attempt to optimize a copy operation.  | 
 Expression | 
tryIndexedFilter(FilterExpression f,
                 StaticContext env,
                 boolean indexedOperand)
Try converting a filter expression to a call on the key function.  | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Optimizer(Configuration config)
| Method Detail | 
|---|
public Configuration getConfiguration()
public BinaryExpression makeGeneralComparison(Expression p0,
                                              int op,
                                              Expression p1,
                                              boolean backwardsCompatible)
public Expression optimizeCopy(Expression select)
                        throws XPathException
select - the expression that selects the items to be copied
XPathException
public Value makeClosure(Expression expression,
                         int ref,
                         XPathContext context)
                  throws XPathException
XPathException
public Expression convertPathExpressionToKey(PathExpression pathExp,
                                             StaticContext env)
                                      throws XPathException
pathExp - The path expression to be converted.
XPathException
public Expression tryIndexedFilter(FilterExpression f,
                                   StaticContext env,
                                   boolean indexedOperand)
public FilterExpression convertToFilterExpression(PathExpression pathExp,
                                                  TypeHierarchy th)
                                           throws StaticError
pathExp - the path expression to be converted
StaticErrorpublic int isIndexableFilter(Expression filter)
filter - the predicate expression
public ValueRepresentation makeIndexedValue(SequenceIterator iter)
                                     throws XPathException
XPathException
  | 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||