public class ExpressionADJ extends Adjunct
Modifier and Type | Field and Description |
---|---|
static ContextItemStaticInfo |
ci |
Expression |
expr |
Constructor and Description |
---|
ExpressionADJ(Expression e) |
Modifier and Type | Method and Description |
---|---|
Expression |
applyAxis(byte axis)
Convert an expression to apply to nodes along a given axis.
|
Expression |
copyLocationInfo(Expression e)
Copy location information from this Expression onto another (new) Expression
|
Expression |
evaluateAgainstBoolean(Expression e,
PatternOptimizationEE patternOptimization)
Given an expression that is known to be true, produce a simplified version of this expression.
|
void |
export(ExpressionPresenter out)
Export - in this case export the wrapped expression
|
Set<Expression> |
getOperandPreconditions(PatternOptimizationEE patternOptimization)
Get preconditions for the operands of an expression
|
static Set<Expression> |
getOperandPreconditions(PatternOptimizationEE patternOptimization,
Expression e)
Get preconditions for the operands of an expression
|
Set<Expression> |
getPreconditions(PatternOptimizationEE patternOptimization)
Get the preconditions for an expression
|
static Set<Expression> |
getPreconditions(PatternOptimizationEE patternOptimization,
Expression e)
Get the preconditions for an expression
|
RetainedStaticContext |
getRetainedStaticContext() |
ExpressionADJ |
important()
Return the adjunct that is important for unification
|
Expression |
interpolateVariables(RewriteContext rc)
Intepolate variable values into this expression
|
Expression[] |
interpolateVariablesOperands(RewriteContext rc)
Interpolate variable values into operands
|
boolean |
isCallOn(Class<? extends SystemFunction> function)
Is this expression a specific function call?
|
Expression |
optimizeForContextType(ContextItemStaticInfo contextItemType)
Optimize a pattern with respect to a context item type
|
Expression |
optimizeForName(int i)
Optimize a pattern with respect to a named node (element or attribute).
|
Expression |
optimizeForType(int type)
Optimize a pattern with respect to a typed node.
|
List<Expression> |
optimizeOperandsForContextType(ContextItemStaticInfo contextItemType) |
boolean |
sameClass(ExpressionADJ adj)
Is this expression the same class as another?
|
Expression |
unify(ExpressionADJ source,
RewriteContext rc)
Unify this expression against another expression
|
Set<RewriteContext> |
unifyingBindings(ExpressionADJ source,
RewriteContext rc)
Unify this expression against another expression
|
Set<RewriteContext> |
unifyOperandBindings(ExpressionADJ source,
RewriteContext rc) |
Expression[] |
unifyOperands(ExpressionADJ source,
RewriteContext rc)
Unify the operands of this expression against the operands of another
|
getExpressionAdjunct, getNodeTestAdjunct, getPatternAdjunct, index, processRewrites
public Expression expr
public static ContextItemStaticInfo ci
public ExpressionADJ(Expression e)
public static Set<Expression> getOperandPreconditions(PatternOptimizationEE patternOptimization, Expression e)
patternOptimization
- controls for the optimizatione
- the expression to examinepublic static Set<Expression> getPreconditions(PatternOptimizationEE patternOptimization, Expression e)
Note that as a Pattern is a subclass of Expression, we need different named functions for each type.
patternOptimization
- controls for the optimizatione
- the expression to examinepublic RetainedStaticContext getRetainedStaticContext()
public Expression optimizeForName(int i)
i
- the fingerprint of the name of the node to be matched.public Expression optimizeForType(int type)
type
- the type of the node to be matched.public Expression optimizeForContextType(ContextItemStaticInfo contextItemType)
contextItemType
- the type of the context itempublic List<Expression> optimizeOperandsForContextType(ContextItemStaticInfo contextItemType)
public Expression applyAxis(byte axis)
axis
- The axis to move this expression topublic Expression evaluateAgainstBoolean(Expression e, PatternOptimizationEE patternOptimization)
e
- the expression assumed to be true.patternOptimization
- public Set<Expression> getPreconditions(PatternOptimizationEE patternOptimization)
Note that as a Pattern is a subclass of Expression, we need different named functions for each type.
patternOptimization
- public Set<Expression> getOperandPreconditions(PatternOptimizationEE patternOptimization)
patternOptimization
- controls for the optimizationpublic Expression copyLocationInfo(Expression e)
e
- the Expression to have location information addedpublic boolean isCallOn(Class<? extends SystemFunction> function)
function
- the function to be checkedpublic boolean sameClass(ExpressionADJ adj)
adj
- the adjunct for the comparison expressionpublic Set<RewriteContext> unifyingBindings(ExpressionADJ source, RewriteContext rc)
source
- the expression to be unified againstrc
- the evaluation context to use (which may be side-effected)public Expression unify(ExpressionADJ source, RewriteContext rc)
source
- the expression to be unified againstrc
- the evaluation context to use (which may be side-effected)public Expression[] unifyOperands(ExpressionADJ source, RewriteContext rc)
source
- the expression to be unified againstrc
- the evaluation context to use (which may be side-effected)public Set<RewriteContext> unifyOperandBindings(ExpressionADJ source, RewriteContext rc)
public Expression[] interpolateVariablesOperands(RewriteContext rc)
rc
- public Expression interpolateVariables(RewriteContext rc)
rc
- the evaluation context (which contains any variable bindings)public ExpressionADJ important()
public void export(ExpressionPresenter out)
out
- Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.