public class PatternADJ extends Adjunct
Constructor and Description |
---|
PatternADJ(Pattern p) |
Modifier and Type | Method and Description |
---|---|
Pattern |
applyAxis(byte axis)
Convert a pattern to apply to nodes along a given axis.
|
Pattern |
copyLocationInfo(Pattern p)
Copy location information from this Pattern onto another (new) Pattern
|
Pattern |
evaluateAgainstBoolean(Expression e,
PatternOptimizationEE patternOptimizationEE)
Evaluate this pattern against an expression designated as 'true' in the execution context.
|
void |
export(ExpressionPresenter out) |
static Set<Expression> |
getPatternPreconditions(PatternOptimizationEE patternOptimization,
Pattern p)
Get the preconditions for a pattern
|
Set<Expression> |
getPreconditions(PatternOptimizationEE patternOptimization)
Get the preconditions for a pattern
|
RetainedStaticContext |
getRetainedStaticContext() |
Pattern |
optimizeForName(int i)
Optimize a pattern with respect to a named node (element or attribute).
|
Pattern |
optimizeForType(int type)
Optimize a pattern with respect to a typed node.
|
Pattern |
optimizePattern()
Generic optimization of a pattern
|
static Pattern |
optimizePattern(Pattern p) |
Pattern |
unify(PatternADJ source,
RewriteContext rc) |
Set<RewriteContext> |
unifyingBindings(PatternADJ source,
RewriteContext rc)
Unify this expression against another expression
|
getExpressionAdjunct, getNodeTestAdjunct, getPatternAdjunct, index, processRewrites
public Pattern pattern
public PatternADJ(Pattern p)
public RetainedStaticContext getRetainedStaticContext()
public Pattern optimizeForName(int i)
i
- the fingerprint of the name of the node to be matched.public Pattern optimizeForType(int type)
type
- the type of the node to be matched.public Pattern optimizePattern()
public Pattern applyAxis(byte axis)
axis
- The axis to mode this pattern topublic Pattern evaluateAgainstBoolean(Expression e, PatternOptimizationEE patternOptimizationEE)
e
- the expression assumed to be true.patternOptimizationEE
- 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
- controls for the optimizationpublic Pattern copyLocationInfo(Pattern p)
p
- the Pattern to have location information addedpublic static Set<Expression> getPatternPreconditions(PatternOptimizationEE patternOptimization, Pattern p)
Note that as a Pattern is a subclass of Expression, we need different named functions for each type.
patternOptimization
- controls for the optimizationp
- the pattern to examinepublic Pattern unify(PatternADJ source, RewriteContext rc)
public Set<RewriteContext> unifyingBindings(PatternADJ source, RewriteContext rc)
source
- the expression to be unified againstrc
- the evaluation context to use (which may be side-effected)public void export(ExpressionPresenter out)
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.