public abstract class Rule
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected OperatorPlan |
currentPlan |
protected static org.apache.commons.logging.Log |
log |
protected java.lang.String |
name |
protected OperatorPlan |
pattern |
Constructor and Description |
---|
Rule(java.lang.String n,
boolean mandatory)
Create this rule by using the default pattern that this rule provided
|
Rule(java.lang.String n,
OperatorPlan p) |
Modifier and Type | Method and Description |
---|---|
protected abstract OperatorPlan |
buildPattern()
Build the pattern that this rule will look for
|
java.lang.String |
getName() |
abstract Transformer |
getNewTransformer()
Get the transformer for this rule.
|
OperatorPlan |
getPattern()
Return the pattern to be matched for this rule
|
boolean |
isMandatory() |
protected boolean |
isSkipListener() |
java.util.List<OperatorPlan> |
match(OperatorPlan plan)
Search for all the sub-plans that matches the pattern
defined by this rule.
|
protected void |
setSkipListener(boolean skip) |
protected java.lang.String name
protected OperatorPlan pattern
protected transient OperatorPlan currentPlan
protected static final org.apache.commons.logging.Log log
public Rule(java.lang.String n, boolean mandatory)
n
- Name of this rulemandatory
- if it is set to false, this rule can be disabled by userpublic Rule(java.lang.String n, OperatorPlan p)
n
- Name of this rulep
- Pattern to look for.protected abstract OperatorPlan buildPattern()
public abstract Transformer getNewTransformer()
public OperatorPlan getPattern()
protected boolean isSkipListener()
protected void setSkipListener(boolean skip)
public java.util.List<OperatorPlan> match(OperatorPlan plan) throws FrontendException
plan
- the OperatorPlan to look for matches to the patternFrontendException
public java.lang.String getName()
public boolean isMandatory()
Copyright © 2007-2017 The Apache Software Foundation