public class ConditionReference extends Condition
Condition.Anchor
Modifier and Type | Field and Description |
---|---|
private boolean |
automataLookup
True if this condition should be looked up in the automata
annotations of the item instead of by reference to another item
|
private String |
conditionName
The name of the referenced rule
|
private NamedCondition |
namedCondition
The actual condition references by this, or null if not initialized or not found,
or if this is really an automata reference
|
Constructor and Description |
---|
ConditionReference(String conditionName) |
ConditionReference(String label,
String conditionName) |
Modifier and Type | Method and Description |
---|---|
private boolean |
automataMatch(RuleEvaluation e) |
private boolean |
automataMatchPhrase(PhraseMatcher.Phrase phrase,
RuleEvaluation e) |
boolean |
doesMatch(RuleEvaluation e)
Returns whether this condition matches the given evaluation
at the current location of the evaluation.
|
String |
getConditionName()
Returns the name of the referenced rule, never null
|
protected boolean |
hasOpenChoicepoint(RuleEvaluation e)
Returns whether there is an open choice in this or any of its subconditions.
|
protected boolean |
isDefaultContextName() |
void |
makeReferences(RuleBase ruleBase)
Override if references needs to be set in this condition of its children
|
void |
setConditionName(String name) |
protected String |
toInnerString()
All instances of this produces a parseable string output
|
getAnchor, getContextName, getLabel, getLabelString, getMatchInfo, getMatchInfoString, getNameSpace, getParent, isReferable, labelMatches, labelMatches, matches, matchesEndAnchor, matchesStartAnchor, postMatchHook, preMatchHook, setAnchor, setContextName, setLabel, setNameSpace, setParent, toString, traceResult
private String conditionName
private NamedCondition namedCondition
private boolean automataLookup
public ConditionReference(String conditionName)
public String getConditionName()
public void setConditionName(String name)
public boolean doesMatch(RuleEvaluation e)
Condition
private boolean automataMatch(RuleEvaluation e)
private boolean automataMatchPhrase(PhraseMatcher.Phrase phrase, RuleEvaluation e)
public void makeReferences(RuleBase ruleBase)
Condition
makeReferences
in class Condition
protected boolean hasOpenChoicepoint(RuleEvaluation e)
Condition
hasOpenChoicepoint
in class Condition
protected boolean isDefaultContextName()
isDefaultContextName
in class Condition
protected String toInnerString()
Condition
toInnerString
in class Condition
Copyright © 2018. All rights reserved.