Class RuleImpl
- All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier,org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.InternalEObject,NamedElement,Rule
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classBase class for code that depends on the rule'sRule.isAbstract()state.protected classBase class for code that depends on whether the rule has aRule.getApplier()code block and/or aRule.getPostApply()code block.protected classRuleImpl.RuleModeStateclass for rules with modeRuleMode.AUTOMATIC_RECURSIVE.protected classRuleImpl.RuleModeStateclass for rules with modeRuleMode.AUTOMATIC_SINGLE.protected classprotected classprotected classBase class for code that depends on the state ofRule.isDefault().protected classBase class for code that depends on the rule'sRule.isDistinctElements()state.protected classprotected classprotected classprotected classprotected classprotected classRuleImpl.LeafStateclass for rules for whichRule.isLeaf()isfalseandRule.isWithLeaves()is alsofalse.protected classRuleImpl.LeafStateclass for rules for whichRule.isLeaf()isfalseandRule.isWithLeaves()istrue.protected classBase class for code that depends on the rule'sRule.isAbstract()andRule.getESubRules().protected classRuleImpl.RuleModeStateclass for rules with modeRuleMode.MANUAL.protected classBase class for code that depends on whether the rule has aRule.getMatcher()code block.protected classBase class for code that depends on the rule'sRule.getMode().protected classBase class for code that depends on whether the rule has anyRule.getESuperRules().protected classprotected classprotected classBase class for code that depends on the state ofRule.isUnique().protected classRuleImpl.ApplierCbStateclass for rules that have aRule.getApplier()code block and noRule.getPostApply()code block.protected classRuleImpl.ApplierCbStateclass for rules that have aRule.getApplier()code block as well as aRule.getPostApply()code block.protected classRuleImpl.MatcherCbStateclass for rules that have aRule.getMatcher()code block.protected classRuleImpl.ApplierCbStateclass for rules that do not have aRule.getApplier()code block or aRule.getPostApply()code block.protected classRuleImpl.ApplierCbStateclass for rules that do not have aRule.getApplier()code block and do have aRule.getPostApply()code block.protected classRuleImpl.MatcherCbStateclass for rules that do not have aRule.getMatcher()code block.protected classRuleImpl.SuperRulesStateclass for rules without anyRule.getESuperRules().protected classRuleImpl.SuperRulesStateclass for rules withRule.getESuperRules().Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImplNested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EScannableAdapterListNested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanThe cached value of the 'Abstract' attribute.protected static final booleanThe default value of the 'Abstract' attribute.protected RuleImpl.AbstractStateThe rule'sisAbstract()state object.The cached transitive closure of super-rules.protected CodeBlockThe cached value of the 'Applier' containment reference.protected RuleImpl.ApplierCbStateThe rule'sgetApplier()state object.The cached arguments for the applier and post-applier code block for a given trace.protected booleanThe cached value of the 'Default' attribute.protected static final booleanThe default value of the 'Default' attribute.protected RuleImpl.DefaultStateThe rule'sisDefault()state object.protected static final booleanThe default value of the 'Distinct Elements' attribute.protected booleanThe cached value of the 'Distinct Elements' attribute.protected RuleImpl.DistinctStateThe rule'sisDistinctElements()state object.protected org.eclipse.emf.common.util.EList<Rule> The cached value of the 'ESub Rules' reference list.protected org.eclipse.emf.common.util.EList<Rule> The cached value of the 'ESuper Rules' reference list.protected FieldContainerField storage and lookup.protected org.eclipse.emf.common.util.EList<Field> The cached value of the 'Fields' containment reference list.protected org.eclipse.emf.common.util.EList<InputRuleElement> The cached value of the 'Input Elements' containment reference list.Pre-compiled list of iterables for each input rule element.Pre-compiled map of iterables for each input rule element.protected booleanThe cached value of the 'Leaf' attribute.protected static final booleanThe default value of the 'Leaf' attribute.protected RuleImpl.LeafStateThe rule'sisLeaf()/isWithLeaves()state object.protected CodeBlockThe cached value of the 'Matcher' containment reference.protected RuleImpl.MatcherCbStateThe rule'sgetMatcher()state object.protected RuleModeThe cached value of the 'Mode' attribute.protected static final RuleModeThe default value of the 'Mode' attribute.protected org.eclipse.emf.common.util.EList<OutputRuleElement> The cached value of the 'Output Elements' containment reference list.protected CodeBlockThe cached value of the 'Post Apply' containment reference.protected static final ObjectMarker object to indicate that a rule is still executing and its return value is pending.protected RuleImpl.RuleModeStateThe rule'sgetMode()state object.protected org.eclipse.emf.common.util.EList<String> The cached value of the 'Super Rules' attribute list.protected RuleImpl.SuperRulesStateThe rule'sgetESuperRules().isEmpty() state object.protected booleanThe cached value of the 'Unique' attribute.protected static final booleanThe default value of the 'Unique' attribute.protected RuleImpl.UniqueStateThe rule'sisUnique()state object.protected static final booleanThe default value of the 'With Leaves' attribute.protected booleanThe cached value of the 'With Leaves' attribute.Fields inherited from class org.eclipse.m2m.atl.emftvm.impl.NamedElementImpl
name, NAME_EDEFAULTFields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXYFields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSETFields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(StackFrame frame) Applies this rule for the created traces.booleanapplyFirst(StackFrame frame) Applies and post-applies this rule for the first recorded match.applyFor(StackFrame frame, TraceLink trace) Applies this rule for the giventrace.applyOne(StackFrame frame, Map<String, Object> valuesMap) Applies this rule tovaluesMap.applyOneTrace(StackFrame frame, Map<String, Object> valuesMap) Applies this rule tovaluesMap.org.eclipse.emf.common.notify.NotificationChainbasicSetApplier(CodeBlock newApplier, org.eclipse.emf.common.notify.NotificationChain msgs) org.eclipse.emf.common.notify.NotificationChainbasicSetMatcher(CodeBlock newMatcher, org.eclipse.emf.common.notify.NotificationChain msgs) org.eclipse.emf.common.notify.NotificationChainbasicSetModule(Module newModule, org.eclipse.emf.common.notify.NotificationChain msgs) org.eclipse.emf.common.notify.NotificationChainbasicSetPostApply(CodeBlock newPostApply, org.eclipse.emf.common.notify.NotificationChain msgs) voidClears the values of all registered fields within this rule.voidcompileIterables(ExecEnv env) Compiles the model element iterables for this rule.voidcompileState(ExecEnv env) Compiles the internal state of this rule for optimised matching.booleancompleteTraceFor(StackFrame frame, TraceLink trace) Completestracefor this rule by creating the output elements.voidcreateTraces(StackFrame frame) Creates trace elements for the recorded matches for this rule.voidcreateUniqueMapping(TraceLink trace) Creates a unique trace mapping entry for the source values intrace, if applicable.org.eclipse.emf.common.notify.NotificationChaineBasicRemoveFromContainerFeature(org.eclipse.emf.common.notify.NotificationChain msgs) eGet(int featureID, boolean resolve, boolean coreType) org.eclipse.emf.common.notify.NotificationChaineInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs) org.eclipse.emf.common.notify.NotificationChaineInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs) booleaneIsSet(int featureID) voidprotected org.eclipse.emf.ecore.EClassReturns theEClassthat correspond to this metaclass.voideUnset(int featureID) findInputElement(String name) Finds theInputRuleElementwith the given name within the rule inheritance hierarchy depth-first.findStaticField(Object context, String name) Returns the transitive closure of super-rules, root rule first (LazySet's have a fixed iteration order).Returns the value of the 'Applier' containment reference.org.eclipse.emf.common.util.EList<Rule> Returns the value of the 'ESub Rules' reference list.org.eclipse.emf.common.util.EList<Rule> Returns the value of the 'ESuper Rules' reference list.org.eclipse.emf.common.util.EList<Field> Returns the value of the 'Fields' containment reference list.org.eclipse.emf.common.util.EList<InputRuleElement> Returns the value of the 'Input Elements' containment reference list.Returns the value of the 'Matcher' containment reference.getMode()Returns the value of the 'Mode' attribute.Returns the value of the 'Module' container reference.org.eclipse.emf.common.util.EList<OutputRuleElement> Returns the value of the 'Output Elements' containment reference list.Returns the value of the 'Post Apply' containment reference.org.eclipse.emf.common.util.EList<String> Returns the value of the 'Super Rules' attribute list.getUniqueTrace(StackFrame frame, Object[] values) Returns the unique rule application trace forvalues, if applicable.booleanReturnstrueiff this rule has any registered fields with the givenname.booleanhasStaticField(String name) Returnstrueiff this rule has any registered static fields with the givenname.booleanReturns the value of the 'Abstract' attribute.booleanReturns the value of the 'Default' attribute.booleanReturns the value of the 'Distinct Elements' attribute.booleanisLeaf()Returns the value of the 'Leaf' attribute.booleanisUnique()Returns the value of the 'Unique' attribute.booleanReturns the value of the 'With Leaves' attribute.matchManual(StackFrame frame, Object[] values) Matches this rule manually, if applicable.matchManualTrace(StackFrame frame, Object[] values) Matches this rule manually, if applicable.booleanmatchOne(StackFrame frame, Map<String, Object> valuesMap) Matches rule forvaluesMap.booleanmatchOneOnly(StackFrame frame, Map<String, Object> valuesMap) Matches this rule only (without super-rules) forvaluesMap.boolean[]matchRecursive(StackFrame frame) Matches this rule for the automatic recursive stage, if applicable.booleanmatchSingle(StackFrame frame) Matches this rule for the automatic single stage, if applicable.voidpostApply(StackFrame frame) Runs post-applier for this rule for the created traces.postApplyFor(StackFrame frame, TraceLink trace) Post-applies this rule for the giventrace.voidregisterField(Field field) voidResets the internal state of this rule.voidsetAbstract(boolean newAbstract) Sets the value of the 'Abstract' attribute.voidsetApplier(CodeBlock newApplier) Sets the value of the 'Applier' containment reference.voidsetDefault(boolean newDefault) Sets the value of the 'Default' attribute.voidsetDistinctElements(boolean newDistinctElements) Sets the value of the 'Distinct Elements' attribute.voidsetMatcher(CodeBlock newMatcher) Sets the value of the 'Matcher' containment reference.voidSets the value of the 'Mode' attribute.voidvoidsetPostApply(CodeBlock newPostApply) Sets the value of the 'Post Apply' containment reference.voidsetUnique(boolean newUnique) Sets the value of the 'Unique' attribute.toString()protected voidUpdatesabstractState.protected voidUpdatesapplierCbState.protected voidUpdatesdefaultState.protected voidUpdatesdistinctState.protected voidUpdatesleafState.protected voidUpdatesmatcherCbState.protected voidUpdatesruleModeState.protected voidUpdatessuperRulesState.protected voidUpdatesuniqueState.Methods inherited from class org.eclipse.m2m.atl.emftvm.impl.NamedElementImpl
getName, setNameMethods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURIMethods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValuesMethods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotifyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnsetMethods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequiredMethods inherited from interface org.eclipse.m2m.atl.emftvm.NamedElement
getName, setNameMethods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
-
Field Details
-
RULE_RETVAL_PENDING
Marker object to indicate that a rule is still executing and its return value is pending. -
MODE_EDEFAULT
The default value of the 'Mode' attribute.- See Also:
-
mode
The cached value of the 'Mode' attribute.- See Also:
-
inputElements
The cached value of the 'Input Elements' containment reference list.- See Also:
-
outputElements
The cached value of the 'Output Elements' containment reference list.- See Also:
-
eSuperRules
The cached value of the 'ESuper Rules' reference list.- See Also:
-
eSubRules
The cached value of the 'ESub Rules' reference list.- See Also:
-
matcher
The cached value of the 'Matcher' containment reference.- See Also:
-
applier
The cached value of the 'Applier' containment reference.- See Also:
-
postApply
The cached value of the 'Post Apply' containment reference.- See Also:
-
superRules
The cached value of the 'Super Rules' attribute list.- See Also:
-
ABSTRACT_EDEFAULT
protected static final boolean ABSTRACT_EDEFAULTThe default value of the 'Abstract' attribute.- See Also:
-
abstract_
protected boolean abstract_The cached value of the 'Abstract' attribute.- See Also:
-
fields
The cached value of the 'Fields' containment reference list.- See Also:
-
DEFAULT_EDEFAULT
protected static final boolean DEFAULT_EDEFAULTThe default value of the 'Default' attribute.- See Also:
-
default_
protected boolean default_The cached value of the 'Default' attribute.- See Also:
-
DISTINCT_ELEMENTS_EDEFAULT
protected static final boolean DISTINCT_ELEMENTS_EDEFAULTThe default value of the 'Distinct Elements' attribute.- See Also:
-
distinctElements
protected boolean distinctElementsThe cached value of the 'Distinct Elements' attribute.- See Also:
-
UNIQUE_EDEFAULT
protected static final boolean UNIQUE_EDEFAULTThe default value of the 'Unique' attribute.- See Also:
-
unique
protected boolean uniqueThe cached value of the 'Unique' attribute.- See Also:
-
LEAF_EDEFAULT
protected static final boolean LEAF_EDEFAULTThe default value of the 'Leaf' attribute.- See Also:
-
leaf
protected boolean leafThe cached value of the 'Leaf' attribute.- See Also:
-
WITH_LEAVES_EDEFAULT
protected static final boolean WITH_LEAVES_EDEFAULTThe default value of the 'With Leaves' attribute.- See Also:
-
withLeaves
protected boolean withLeavesThe cached value of the 'With Leaves' attribute.- See Also:
-
fieldContainer
Field storage and lookup. -
uniqueState
The rule'sisUnique()state object. -
defaultState
The rule'sisDefault()state object. -
superRulesState
The rule'sgetESuperRules().isEmpty() state object. -
ruleModeState
The rule'sgetMode()state object. -
leafState
The rule'sisLeaf()/isWithLeaves()state object. -
abstractState
The rule'sisAbstract()state object. -
matcherCbState
The rule'sgetMatcher()state object. -
applierCbState
The rule'sgetApplier()state object. -
distinctState
The rule'sisDistinctElements()state object. -
allESuperRules
The cached transitive closure of super-rules. -
applyArgs
The cached arguments for the applier and post-applier code block for a given trace. -
iterableList
Pre-compiled list of iterables for each input rule element. -
iterableMap
Pre-compiled map of iterables for each input rule element.
-
-
Constructor Details
-
RuleImpl
protected RuleImpl()Creates a newRuleImpl.
-
-
Method Details
-
eStaticClass
protected org.eclipse.emf.ecore.EClass eStaticClass()Returns theEClassthat correspond to this metaclass.- Overrides:
eStaticClassin classNamedElementImpl- Returns:
- the
EClassthat correspond to this metaclass.
-
getModule
Returns the value of the 'Module' container reference. It is bidirectional and its opposite is 'Rules'.If the meaning of the 'Module' container reference isn't clear, there really should be more of a description here...
-
basicSetModule
public org.eclipse.emf.common.notify.NotificationChain basicSetModule(Module newModule, org.eclipse.emf.common.notify.NotificationChain msgs) -
setModule
-
getMode
Returns the value of the 'Mode' attribute. The literals are from the enumerationRuleMode.If the meaning of the 'Mode' attribute isn't clear, there really should be more of a description here...
-
setMode
Sets the value of the 'Mode' attribute. -
getInputElements
Returns the value of the 'Input Elements' containment reference list. The list contents are of typeInputRuleElement. It is bidirectional and its opposite is 'Input For'.If the meaning of the 'Input Elements' containment reference list isn't clear, there really should be more of a description here...
- Specified by:
getInputElementsin interfaceRule- Returns:
- the value of the 'Input Elements' containment reference list.
- See Also:
-
getOutputElements
Returns the value of the 'Output Elements' containment reference list. The list contents are of typeOutputRuleElement. It is bidirectional and its opposite is 'Output For'.If the meaning of the 'Output Elements' containment reference list isn't clear, there really should be more of a description here...
- Specified by:
getOutputElementsin interfaceRule- Returns:
- the value of the 'Output Elements' containment reference list.
- See Also:
-
getESuperRules
Returns the value of the 'ESuper Rules' reference list. The list contents are of typeRule. It is bidirectional and its opposite is 'ESub Rules'.If the meaning of the 'ESuper Rules' reference list isn't clear, there really should be more of a description here...
- Specified by:
getESuperRulesin interfaceRule- Returns:
- the value of the 'ESuper Rules' reference list.
- See Also:
-
getESubRules
Returns the value of the 'ESub Rules' reference list. The list contents are of typeRule. It is bidirectional and its opposite is 'ESuper Rules'.If the meaning of the 'ESub Rules' reference list isn't clear, there really should be more of a description here...
- Specified by:
getESubRulesin interfaceRule- Returns:
- the value of the 'ESub Rules' reference list.
- See Also:
-
getMatcher
Returns the value of the 'Matcher' containment reference. It is bidirectional and its opposite is 'Matcher For'.If the meaning of the 'Matcher' containment reference isn't clear, there really should be more of a description here...
- Specified by:
getMatcherin interfaceRule- Returns:
- the value of the 'Matcher' containment reference.
- See Also:
-
basicSetMatcher
public org.eclipse.emf.common.notify.NotificationChain basicSetMatcher(CodeBlock newMatcher, org.eclipse.emf.common.notify.NotificationChain msgs) - See Also:
-
setMatcher
Sets the value of the 'Matcher' containment reference.- Specified by:
setMatcherin interfaceRule- Parameters:
newMatcher- the new value of the 'Matcher' containment reference.- See Also:
-
getApplier
Returns the value of the 'Applier' containment reference. It is bidirectional and its opposite is 'Applier For'.If the meaning of the 'Applier' containment reference isn't clear, there really should be more of a description here...
- Specified by:
getApplierin interfaceRule- Returns:
- the value of the 'Applier' containment reference.
- See Also:
-
basicSetApplier
public org.eclipse.emf.common.notify.NotificationChain basicSetApplier(CodeBlock newApplier, org.eclipse.emf.common.notify.NotificationChain msgs) - See Also:
-
setApplier
Sets the value of the 'Applier' containment reference.- Specified by:
setApplierin interfaceRule- Parameters:
newApplier- the new value of the 'Applier' containment reference.- See Also:
-
getPostApply
Returns the value of the 'Post Apply' containment reference. It is bidirectional and its opposite is 'Post Apply For'.If the meaning of the 'Post Apply' containment reference isn't clear, there really should be more of a description here...
- Specified by:
getPostApplyin interfaceRule- Returns:
- the value of the 'Post Apply' containment reference.
- See Also:
-
basicSetPostApply
public org.eclipse.emf.common.notify.NotificationChain basicSetPostApply(CodeBlock newPostApply, org.eclipse.emf.common.notify.NotificationChain msgs) - See Also:
-
setPostApply
Sets the value of the 'Post Apply' containment reference.- Specified by:
setPostApplyin interfaceRule- Parameters:
newPostApply- the new value of the 'Post Apply' containment reference.- See Also:
-
getSuperRules
Returns the value of the 'Super Rules' attribute list. The list contents are of typeString.If the meaning of the 'Super Rules' reference list isn't clear, there really should be more of a description here...
- Specified by:
getSuperRulesin interfaceRule- Returns:
- the value of the 'Super Rules' attribute list.
- See Also:
-
isAbstract
public boolean isAbstract()Returns the value of the 'Abstract' attribute.If the meaning of the 'Abstract' attribute isn't clear, there really should be more of a description here...
- Specified by:
isAbstractin interfaceRule- Returns:
- the value of the 'Abstract' attribute.
- See Also:
-
setAbstract
public void setAbstract(boolean newAbstract) Sets the value of the 'Abstract' attribute.- Specified by:
setAbstractin interfaceRule- Parameters:
newAbstract- the new value of the 'Abstract' attribute.- See Also:
-
getFields
-
isDefault
public boolean isDefault()Returns the value of the 'Default' attribute.If the meaning of the 'Default' attribute isn't clear, there really should be more of a description here...
-
setDefault
public void setDefault(boolean newDefault) Sets the value of the 'Default' attribute.- Specified by:
setDefaultin interfaceRule- Parameters:
newDefault- the new value of the 'Default' attribute.- See Also:
-
isDistinctElements
public boolean isDistinctElements()Returns the value of the 'Distinct Elements' attribute.If the meaning of the 'Distinct Elements' attribute isn't clear, there really should be more of a description here...
- Specified by:
isDistinctElementsin interfaceRule- Returns:
- the value of the 'Distinct Elements' attribute.
- See Also:
-
setDistinctElements
public void setDistinctElements(boolean newDistinctElements) Sets the value of the 'Distinct Elements' attribute.- Specified by:
setDistinctElementsin interfaceRule- Parameters:
newDistinctElements- the new value of the 'Distinct Elements' attribute.- See Also:
-
isUnique
public boolean isUnique()Returns the value of the 'Unique' attribute.A unique rule matches at most once against a unique (list of) source value(s). Traces created by a unique rule can also be efficiently lookup up, because each (list of) source value(s) maps to at most one (list of) target value(s).
-
setUnique
public void setUnique(boolean newUnique) Sets the value of the 'Unique' attribute. -
isLeaf
public boolean isLeaf()Returns the value of the 'Leaf' attribute.A rule is a leaf rule when it is not abstract, and it has no leaf sub-rules. Call
before calling this method.invalid reference
#compileState() -
isWithLeaves
public boolean isWithLeaves()Returns the value of the 'With Leaves' attribute.A rule is with leaves if it has leaf sub-rules. Call
before calling this method.invalid reference
#compileState()- Specified by:
isWithLeavesin interfaceRule- Returns:
- the value of the 'With Leaves' attribute.
- See Also:
-
findField
-
hasField
Returnstrueiff this rule has any registered fields with the givenname. -
findStaticField
- Specified by:
findStaticFieldin interfaceRule- Parameters:
context- the context type of the fieldname- the operation name- Returns:
- the static
Fieldwith the given properties, ornullif none registered
-
hasStaticField
Returnstrueiff this rule has any registered static fields with the givenname.- Specified by:
hasStaticFieldin interfaceRule- Parameters:
name- the field name- Returns:
trueiff this rule has any registered static fields with the givenname
-
registerField
- Specified by:
registerFieldin interfaceRule- Parameters:
field- theFieldto register
-
matchSingle
Matches this rule for the automatic single stage, if applicable. Callbefore calling this method.invalid reference
#compileState()- Specified by:
matchSinglein interfaceRule- Parameters:
frame- the stack frame in which to execute the matcher- Returns:
trueiff the rule has any matches
-
matchRecursive
Matches this rule for the automatic recursive stage, if applicable. Callbefore calling this method.invalid reference
#compileState()- Specified by:
matchRecursivein interfaceRule- Parameters:
frame- the stack frame in which to execute the matcher- Returns:
- [
trueiff the rule has any matches,trueiff there was a guaranteed final match]
-
matchManual
Matches this rule manually, if applicable. Callbefore calling this method.invalid reference
#compileState()- Specified by:
matchManualin interfaceRule- 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
-
matchManualTrace
Matches this rule manually, if applicable. Callbefore calling this method. 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
#compileState()- Specified by:
matchManualTracein interfaceRule- 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
-
matchOne
Matches rule forvaluesMap. Callbefore calling this method.invalid reference
#compileState() -
matchOneOnly
Matches this rule only (without super-rules) forvaluesMap. Callbefore calling this method.invalid reference
#compileState()- Specified by:
matchOneOnlyin interfaceRule- Parameters:
frame- the stack frame in which to execute the matchervaluesMap- the values to match against- Returns:
trueiff the rule matches
-
createTraces
Creates trace elements for the recorded matches for this rule. Callbefore calling this method.invalid reference
#compileState()- Specified by:
createTracesin interfaceRule- Parameters:
frame- the stack frame context
-
completeTraceFor
Completestracefor this rule by creating the output elements. Will create default/unique trace iff mapsTo information exists. Callbefore calling this method.invalid reference
#compileState()- Specified by:
completeTraceForin interfaceRule- Parameters:
frame- the stack frame contexttrace- the trace to complete- Returns:
trueiff default/unique mappings were defined for the complete list of source elements
-
apply
Applies this rule for the created traces. Callbefore calling this method.invalid reference
#compileState() -
postApply
Runs post-applier for this rule for the created traces. Callbefore calling this method.invalid reference
#compileState() -
applyFirst
Applies and post-applies this rule for the first recorded match. Callbefore calling this method.invalid reference
#compileState()- Specified by:
applyFirstin interfaceRule- Parameters:
frame- the stack frame in which to execute the applier and post-applier- Returns:
trueiff this rule was applied
-
applyOne
Applies this rule tovaluesMap. -
applyOneTrace
Applies this rule tovaluesMap.- Specified by:
applyOneTracein interfaceRule- Parameters:
frame- the stack frame in which to execute the applier and post-applyvaluesMap- the source and target values to which to apply the rule- Returns:
- the rule application trace
-
applyFor
Applies this rule for the giventrace. Callbefore calling this method.invalid reference
#compileState() -
postApplyFor
Post-applies this rule for the giventrace. Callbefore calling this method.invalid reference
#compileState()- Specified by:
postApplyForin interfaceRule- Parameters:
frame- the stack frame contexttrace- the trace link to post-apply the rule for- Returns:
- the post-application result
-
getAllESuperRules
Returns the transitive closure of super-rules, root rule first (LazySet's have a fixed iteration order). Callbefore calling this method.invalid reference
#compileState()- Specified by:
getAllESuperRulesin interfaceRule- Returns:
- the transitive closure of super-rules.
-
createUniqueMapping
Creates a unique trace mapping entry for the source values intrace, if applicable.- Specified by:
createUniqueMappingin interfaceRule- Parameters:
trace- the trace element with source values
-
compileState
Compiles the internal state of this rule for optimised matching. Call this method whenever any properties of this rule or any sub-rules have changed.- Specified by:
compileStatein interfaceRule- Parameters:
env- the execution environment context
-
resetState
public void resetState()Resets the internal state of this rule. Call this method before callingRule.compileState(ExecEnv)on all rules.- Specified by:
resetStatein interfaceRule
-
compileIterables
Compiles the model element iterables for this rule. Call this method whenever any input or in/out model has changed.- Specified by:
compileIterablesin interfaceRule- Parameters:
env- the execution environment context
-
clearFields
public void clearFields()Clears the values of all registered fields within this rule.- Specified by:
clearFieldsin interfaceRule
-
findInputElement
Finds theInputRuleElementwith the given name within the rule inheritance hierarchy depth-first.- Specified by:
findInputElementin interfaceRule- Parameters:
name- the input element name- Returns:
- the
InputRuleElementwith the given name ornull
-
getUniqueTrace
Returns the unique rule application trace forvalues, if applicable.- Specified by:
getUniqueTracein interfaceRule- Parameters:
frame- the stack frame contextvalues- the source values for the trace- Returns:
- the unique rule application trace, or
null
-
eInverseAdd
public org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs) - Overrides:
eInverseAddin classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eInverseRemove
public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs) - Overrides:
eInverseRemovein classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eBasicRemoveFromContainerFeature
public org.eclipse.emf.common.notify.NotificationChain eBasicRemoveFromContainerFeature(org.eclipse.emf.common.notify.NotificationChain msgs) - Overrides:
eBasicRemoveFromContainerFeaturein classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eGet
- Specified by:
eGetin interfaceorg.eclipse.emf.ecore.InternalEObject- Overrides:
eGetin classNamedElementImpl
-
eSet
- Specified by:
eSetin interfaceorg.eclipse.emf.ecore.InternalEObject- Overrides:
eSetin classNamedElementImpl
-
eUnset
public void eUnset(int featureID) - Specified by:
eUnsetin interfaceorg.eclipse.emf.ecore.InternalEObject- Overrides:
eUnsetin classNamedElementImpl
-
eIsSet
public boolean eIsSet(int featureID) - Specified by:
eIsSetin interfaceorg.eclipse.emf.ecore.InternalEObject- Overrides:
eIsSetin classNamedElementImpl
-
toString
- Overrides:
toStringin classNamedElementImpl
-
updateDefaultState
protected void updateDefaultState()UpdatesdefaultState. -
updateUniqueState
protected void updateUniqueState()UpdatesuniqueState. -
updateSuperRulesState
protected void updateSuperRulesState()UpdatessuperRulesState. -
updateRuleModeState
protected void updateRuleModeState()UpdatesruleModeState. -
updateLeafState
protected void updateLeafState()UpdatesleafState. -
updateAbstractState
protected void updateAbstractState()UpdatesabstractState. -
updateMatcherCbState
protected void updateMatcherCbState()UpdatesmatcherCbState. -
updateApplierCbState
protected void updateApplierCbState()UpdatesapplierCbState. -
updateDistinctState
protected void updateDistinctState()UpdatesdistinctState.
-