Package org.eclipse.m2m.atl.emftvm.impl
Class RuleImpl.UniqueOnState
java.lang.Object
org.eclipse.m2m.atl.emftvm.impl.RuleImpl.UniqueState
org.eclipse.m2m.atl.emftvm.impl.RuleImpl.UniqueOnState
- Enclosing class:
RuleImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyOne(StackFrame frame, TraceLink trace) Appliestoinvalid reference
#getRule()tracevoidcheckAndCreateUniqueMapping(TracedRule tr, org.eclipse.emf.common.util.EList<SourceElement> ses) Checks for existence and creates a unique trace mapping entry for the source values inses, if applicable.voidcreateUniqueMapping(TraceLink trace) Creates a unique trace mapping entry for the source values intrace, if applicable.getUniqueTrace(StackFrame frame, Object[] values) Returns the unique rule application trace forvalues, if applicable.booleanmatchFor(StackFrame frame, Object[] values) Matches this rule againstvalues, and records a match inExecEnv.getMatches()in case of a match.booleanMatches this rule againstvalues, and records a match inExecEnv.getMatches()in case of a match.
-
Constructor Details
-
UniqueOnState
protected UniqueOnState()
-
-
Method Details
-
createUniqueMapping
Creates a unique trace mapping entry for the source values intrace, if applicable.- Specified by:
createUniqueMappingin classRuleImpl.UniqueState- Parameters:
trace- the trace element with source values
-
checkAndCreateUniqueMapping
public void checkAndCreateUniqueMapping(TracedRule tr, org.eclipse.emf.common.util.EList<SourceElement> ses) Checks for existence and creates a unique trace mapping entry for the source values inses, if applicable.- Specified by:
checkAndCreateUniqueMappingin classRuleImpl.UniqueState- Parameters:
tr- the traced rule to add the unique traces toses- the source values that serve as a the unique trace key
-
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.- Specified by:
matchForin classRuleImpl.UniqueState- 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.- Specified by:
matchForin classRuleImpl.UniqueState- 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
-
getUniqueTrace
Returns the unique rule application trace forvalues, if applicable.- Overrides:
getUniqueTracein classRuleImpl.UniqueState- Parameters:
frame- the stack frame contextvalues- the source values for the trace- Returns:
- the unique rule application trace, or
null
-
applyOne
Appliestoinvalid reference
#getRule()trace- Overrides:
applyOnein classRuleImpl.UniqueState- Parameters:
frame- the stack frame in which to execute the applier and post-applytrace- the trace link with values to which to apply the rule- Returns:
- the rule application result
-