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
Base class for code that depends on the rule's
Rule.getMode().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanmatchFor(StackFrame frame, Object[] values) Matches this rule againstvalues, and records a match inExecEnv.getMatches()in case of a match.abstract booleanMatches this rule againstvalues, and records a match inExecEnv.getMatches()in case of a match.matchManual(StackFrame frame, Object[] values) Matchesmanually, if applicable.invalid reference
#getRule()matchManualTrace(StackFrame frame, Object[] values) Matchesmanually, if applicable.invalid reference
#getRule()boolean[]matchRecursive(StackFrame frame) Matchesfor the automatic recursive stage, if applicable.invalid reference
#getRule()booleanmatchSingle(StackFrame frame) Matchesfor the automatic single stage, if applicable.invalid reference
#getRule()
-
Constructor Details
-
RuleModeState
protected RuleModeState()
-
-
Method Details
-
matchSingle
Matchesfor the automatic single stage, if applicable.invalid reference
#getRule()- Parameters:
frame- the stack frame in which to execute the matcher- Returns:
trueiff the rule has any matches
-
matchRecursive
Matchesfor the automatic recursive stage, if applicable.invalid reference
#getRule()- Parameters:
frame- the stack frame in which to execute the matcher- Returns:
trueiff the rule has any matches
-
matchManual
Matchesmanually, if applicable.invalid reference
#getRule()- 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
-
matchManualTrace
Matchesmanually, if applicable. Because this method returns the application trace rather than the return value, it can be invoked in a reentrant manner (i.e. while still evaluating the previous invocation).invalid reference
#getRule()- Parameters:
frame- the stack frame in which to execute the matchervalues- the values to match against- Returns:
- the rule application trace, or
nullif the rule did not match - Throws:
VMException- if this is not aRuleMode.MANUALrule
-
matchFor
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
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
-