public abstract class Rule extends Object
Modifier and Type | Field and Description |
---|---|
protected OperatorPlan |
currentPlan |
protected static org.apache.commons.logging.Log |
log |
protected String |
name |
protected OperatorPlan |
pattern |
Constructor and Description |
---|
Rule(String n,
boolean mandatory)
Create this rule by using the default pattern that this rule provided
|
Rule(String n,
OperatorPlan p) |
Modifier and Type | Method and Description |
---|---|
protected abstract OperatorPlan |
buildPattern()
Build the pattern that this rule will look for
|
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() |
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 String name
protected OperatorPlan pattern
protected transient OperatorPlan currentPlan
protected static final org.apache.commons.logging.Log log
public Rule(String n, boolean mandatory)
n
- Name of this rulemandatory
- if it is set to false, this rule can be disabled by userpublic Rule(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 List<OperatorPlan> match(OperatorPlan plan) throws FrontendException
plan
- the OperatorPlan to look for matches to the patternFrontendException
public String getName()
public boolean isMandatory()
Copyright © 2007-2017 The Apache Software Foundation