Package org.eclipse.m2m.atl.emftvm.impl
Class RuleImpl.RuleModeState
- java.lang.Object
-
- org.eclipse.m2m.atl.emftvm.impl.RuleImpl.RuleModeState
-
- Direct Known Subclasses:
RuleImpl.AutomaticRecursiveState,RuleImpl.AutomaticSingleState,RuleImpl.ManualState
- Enclosing class:
- RuleImpl
protected abstract class RuleImpl.RuleModeState extends java.lang.ObjectBase class for code that depends on the rule'sRule.getMode().
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRuleModeState()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanmatchFor(StackFrame frame, java.lang.Object[] values)Matches this rule againstvalues, and records a match inExecEnv.getMatches()in case of a match.abstract booleanmatchFor(StackFrame frame, java.util.Map<java.lang.String,java.lang.Object> valuesMap, java.lang.Object[] values)Matches this rule againstvalues, and records a match inExecEnv.getMatches()in case of a match.java.lang.ObjectmatchManual(StackFrame frame, java.lang.Object[] values)Matches#getRule()manually, if applicable.boolean[]matchRecursive(StackFrame frame)Matches#getRule()for the automatic recursive stage, if applicable.booleanmatchSingle(StackFrame frame)Matches#getRule()for the automatic single stage, if applicable.
-
-
-
Method Detail
-
matchSingle
public boolean matchSingle(StackFrame frame)
Matches#getRule()for the automatic single stage, if applicable.- Parameters:
frame- the stack frame in which to execute the matcher- Returns:
trueiff the rule has any matches
-
matchRecursive
public boolean[] matchRecursive(StackFrame frame)
Matches#getRule()for the automatic recursive stage, if applicable.- Parameters:
frame- the stack frame in which to execute the matcher- Returns:
trueiff the rule has any matches
-
matchManual
public java.lang.Object matchManual(StackFrame frame, java.lang.Object[] values)
Matches#getRule()manually, if applicable.- Parameters:
frame- the stack frame in which to execute the matchervalues- the values to match against- Returns:
- the rule application result, or
nullif the rule did not match - Throws:
VMException- if this is not aRuleMode.MANUALrule
-
matchFor
public abstract boolean matchFor(StackFrame frame, java.lang.Object[] values)
Matches this rule againstvalues, and records a match inExecEnv.getMatches()in case of a match. In case of a unique rule, this method will not match if the rule has already matched againstvaluesbefore.- Parameters:
frame- the stack frame contextvalues- the source values to match against- Returns:
trueiff this rule matches againstvalues
-
matchFor
public abstract boolean matchFor(StackFrame frame, java.util.Map<java.lang.String,java.lang.Object> valuesMap, java.lang.Object[] values)
Matches this rule againstvalues, and records a match inExecEnv.getMatches()in case of a match. In case of a unique rule, this method will not match if the rule has already matched againstvaluesbefore.- Parameters:
frame- the stack frame contextvaluesMap- the map of all values, including super-rule elementsvalues- the source values to match against- Returns:
trueiff this rule matches againstvalues
-
-