public class PromotionOffer extends Object
| Modifier and Type | Field and Description | 
|---|---|
| boolean | acceptedFlag that is set if the offer has been accepted, that is, if the expression has changed | 
| int | actionaction is one of the possible promotion actions, FOCUS_INDEPENDENT, RANGE_INDEPENDENT,
 INLINE_VARIABLE_REFERENCES, UNORDERED, EXTRACT_GLOBAL_VARIABLES | 
| Binding[] | bindingListIn the case of RANGE_INDEPENDENT, "binding" identifies the range variables whose dependencies
 we are looking for. | 
| Expression | containingExpressionWhen a promotion offer is made, containingExpression identifies the level to which the promotion
 should occur. | 
| static int | EXTRACT_GLOBAL_VARIABLESEXTRACT_GLOBAL_VARIABLES identifies subexpressions that are not constant, but have no dependencies
 other than on global variables or parameters (they must also be non-creative). | 
| static int | FOCUS_INDEPENDENTFOCUS_INDEPENDENT requests promotion of all non-trivial subexpressions that don't depend on the
 focus. | 
| static int | INLINE_VARIABLE_REFERENCESInline variable references causes all references to a variable V to be replaced by the
 expression E. | 
| boolean | promoteDocumentDependentIn the case of FOCUS_INDEPENDENT, "promoteDocumentDependent" is a boolean that, when set to
 true, indicates that it is safe to promote a subexpression that depends on the context document
 but not on other aspects of the focus. | 
| boolean | promoteXSLTFunctionsIn the case of FOCUS_INDEPENDENT, "promoteXSLTFunctions" is a boolean that, when set to true, indicates
 that it is safe to promote XSLT functions such as current(). | 
| static int | RANGE_INDEPENDENTRANGE_INDEPENDENT requests promotion of all non-trivial subexpressions that don't depend on a
 specified range variable. | 
| static int | REPLACE_CURRENTREPLACE_CURRENT causes calls to the XSLT current() function to be replaced by
 reference to a variable. | 
| boolean | retainAllNodesIn the case of UNORDERED, "retainAllNodes" is a boolean that is set to
 true if the nodes can be delivered in any order so long as the right number of nodes
 are delivered. | 
| static int | UNORDEREDUNORDERED indicates that the containing expression does not require the results
 to be delivered in any particular order. | 
| ExpressionVisitor | visitorThe expression visitor in use | 
| Constructor and Description | 
|---|
| PromotionOffer(Optimizer optimizer)Create a PromotionOffer for use with a particular Optimizer | 
| Modifier and Type | Method and Description | 
|---|---|
| Expression | accept(Expression parent,
      Expression child)Method to test whether a subexpression qualifies for promotion, and if so, to
 accept the promotion. | 
| Optimizer | getOptimizer()Get the optimizer in use | 
public static final int FOCUS_INDEPENDENT
public static final int RANGE_INDEPENDENT
public static final int INLINE_VARIABLE_REFERENCES
public static final int UNORDERED
public static final int REPLACE_CURRENT
public static final int EXTRACT_GLOBAL_VARIABLES
public ExpressionVisitor visitor
public int action
public boolean promoteDocumentDependent
public boolean promoteXSLTFunctions
public boolean retainAllNodes
public Binding[] bindingList
public Expression containingExpression
public boolean accepted
public PromotionOffer(Optimizer optimizer)
optimizer - the optimizerpublic Optimizer getOptimizer()
public Expression accept(Expression parent, Expression child) throws XPathException
parent - child - the subexpression in questionXPathExceptionCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.