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
Modifier and TypeClassDescriptionprotected class
Base class for code that depends on the rule'sRule.isAbstract()
state.protected class
Base class for code that depends on whether the rule has aRule.getApplier()
code block and/or aRule.getPostApply()
code block.protected class
RuleImpl.RuleModeState
class for rules with modeRuleMode.AUTOMATIC_RECURSIVE
.protected class
RuleImpl.RuleModeState
class for rules with modeRuleMode.AUTOMATIC_SINGLE
.protected class
protected class
protected class
Base class for code that depends on the state ofRule.isDefault()
.protected class
Base class for code that depends on the rule'sRule.isDistinctElements()
state.protected class
protected class
protected class
protected class
protected class
protected class
RuleImpl.LeafState
class for rules for whichRule.isLeaf()
isfalse
andRule.isWithLeaves()
is alsofalse
.protected class
RuleImpl.LeafState
class for rules for whichRule.isLeaf()
isfalse
andRule.isWithLeaves()
istrue
.protected class
Base class for code that depends on the rule'sRule.isAbstract()
andRule.getESubRules()
.protected class
RuleImpl.RuleModeState
class for rules with modeRuleMode.MANUAL
.protected class
Base class for code that depends on whether the rule has aRule.getMatcher()
code block.protected class
Base class for code that depends on the rule'sRule.getMode()
.protected class
Base class for code that depends on whether the rule has anyRule.getESuperRules()
.protected class
protected class
protected class
Base class for code that depends on the state ofRule.isUnique()
.protected class
RuleImpl.ApplierCbState
class for rules that have aRule.getApplier()
code block and noRule.getPostApply()
code block.protected class
RuleImpl.ApplierCbState
class for rules that have aRule.getApplier()
code block as well as aRule.getPostApply()
code block.protected class
RuleImpl.MatcherCbState
class for rules that have aRule.getMatcher()
code block.protected class
RuleImpl.ApplierCbState
class for rules that do not have aRule.getApplier()
code block or aRule.getPostApply()
code block.protected class
RuleImpl.ApplierCbState
class for rules that do not have aRule.getApplier()
code block and do have aRule.getPostApply()
code block.protected class
RuleImpl.MatcherCbState
class for rules that do not have aRule.getMatcher()
code block.protected class
RuleImpl.SuperRulesState
class for rules without anyRule.getESuperRules()
.protected class
RuleImpl.SuperRulesState
class 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.EPropertiesHolderImpl
Nested 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.EScannableAdapterList
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
The cached value of the 'Abstract
' attribute.protected static final boolean
The default value of the 'Abstract
' attribute.protected RuleImpl.AbstractState
The rule'sisAbstract()
state object.The cached transitive closure of super-rules.protected CodeBlock
The cached value of the 'Applier
' containment reference.protected RuleImpl.ApplierCbState
The rule'sgetApplier()
state object.The cached arguments for the applier and post-applier code block for a given trace.protected boolean
The cached value of the 'Default
' attribute.protected static final boolean
The default value of the 'Default
' attribute.protected RuleImpl.DefaultState
The rule'sisDefault()
state object.protected static final boolean
The default value of the 'Distinct Elements
' attribute.protected boolean
The cached value of the 'Distinct Elements
' attribute.protected RuleImpl.DistinctState
The 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 FieldContainer
Field 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 boolean
The cached value of the 'Leaf
' attribute.protected static final boolean
The default value of the 'Leaf
' attribute.protected RuleImpl.LeafState
The rule'sisLeaf()
/isWithLeaves()
state object.protected CodeBlock
The cached value of the 'Matcher
' containment reference.protected RuleImpl.MatcherCbState
The rule'sgetMatcher()
state object.protected RuleMode
The cached value of the 'Mode
' attribute.protected static final RuleMode
The 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 CodeBlock
The cached value of the 'Post Apply
' containment reference.protected RuleImpl.RuleModeState
The rule'sgetMode()
state object.protected org.eclipse.emf.common.util.EList<String>
The cached value of the 'Super Rules
' attribute list.protected RuleImpl.SuperRulesState
The rule'sgetESuperRules()
.isEmpty() state object.protected boolean
The cached value of the 'Unique
' attribute.protected static final boolean
The default value of the 'Unique
' attribute.protected RuleImpl.UniqueState
The rule'sisUnique()
state object.protected static final boolean
The default value of the 'With Leaves
' attribute.protected boolean
The cached value of the 'With Leaves
' attribute.Fields inherited from class org.eclipse.m2m.atl.emftvm.impl.NamedElementImpl
name, NAME_EDEFAULT
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(StackFrame frame) Applies this rule for the created traces.boolean
applyFirst
(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 totrace
org.eclipse.emf.common.notify.NotificationChain
basicSetApplier
(CodeBlock newApplier, org.eclipse.emf.common.notify.NotificationChain msgs) org.eclipse.emf.common.notify.NotificationChain
basicSetMatcher
(CodeBlock newMatcher, org.eclipse.emf.common.notify.NotificationChain msgs) org.eclipse.emf.common.notify.NotificationChain
basicSetModule
(Module newModule, org.eclipse.emf.common.notify.NotificationChain msgs) org.eclipse.emf.common.notify.NotificationChain
basicSetPostApply
(CodeBlock newPostApply, org.eclipse.emf.common.notify.NotificationChain msgs) void
Clears the values of all registered fields within this rule.void
compileIterables
(ExecEnv env) Compiles the model element iterables for this rule.void
compileState
(ExecEnv env) Compiles the internal state of this rule for optimised matching.boolean
completeTraceFor
(StackFrame frame, TraceLink trace) Completestrace
for this rule by creating the output elements.void
createTraces
(StackFrame frame) Creates trace elements for the recorded matches for this rule.void
createUniqueMapping
(TraceLink trace) Creates a unique trace mapping entry for the source values intrace
, if applicable.org.eclipse.emf.common.notify.NotificationChain
eBasicRemoveFromContainerFeature
(org.eclipse.emf.common.notify.NotificationChain msgs) eGet
(int featureID, boolean resolve, boolean coreType) org.eclipse.emf.common.notify.NotificationChain
eInverseAdd
(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs) org.eclipse.emf.common.notify.NotificationChain
eInverseRemove
(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs) boolean
eIsSet
(int featureID) void
protected org.eclipse.emf.ecore.EClass
Returns theEClass
that correspond to this metaclass.void
eUnset
(int featureID) findInputElement
(String name) Finds theInputRuleElement
with 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.boolean
Returnstrue
iff this rule has any registered fields with the givenname
.boolean
hasStaticField
(String name) Returnstrue
iff this rule has any registered static fields with the givenname
.boolean
Returns the value of the 'Abstract' attribute.boolean
Returns the value of the 'Default' attribute.boolean
Returns the value of the 'Distinct Elements' attribute.boolean
isLeaf()
Returns the value of the 'Leaf' attribute.boolean
isUnique()
Returns the value of the 'Unique' attribute.boolean
Returns the value of the 'With Leaves' attribute.matchManual
(StackFrame frame, Object[] values) Matches this rule manually, if applicable.boolean
matchOne
(StackFrame frame, Map<String, Object> valuesMap) Matches rule forvaluesMap
.boolean
matchOneOnly
(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.boolean
matchSingle
(StackFrame frame) Matches this rule for the automatic single stage, if applicable.void
postApply
(StackFrame frame) Runs post-applier for this rule for the created traces.postApplyFor
(StackFrame frame, TraceLink trace) Post-applies this rule for the giventrace
.void
registerField
(Field field) void
Resets the internal state of this rule.void
setAbstract
(boolean newAbstract) Sets the value of the 'Abstract
' attribute.void
setApplier
(CodeBlock newApplier) Sets the value of the 'Applier
' containment reference.void
setDefault
(boolean newDefault) Sets the value of the 'Default
' attribute.void
setDistinctElements
(boolean newDistinctElements) Sets the value of the 'Distinct Elements
' attribute.void
setMatcher
(CodeBlock newMatcher) Sets the value of the 'Matcher
' containment reference.void
Sets the value of the 'Mode
' attribute.void
Sets the value of the 'Module
' container reference.void
setPostApply
(CodeBlock newPostApply) Sets the value of the 'Post Apply
' containment reference.void
setUnique
(boolean newUnique) Sets the value of the 'Unique
' attribute.toString()
protected void
UpdatesabstractState
.protected void
UpdatesapplierCbState
.protected void
UpdatesdefaultState
.protected void
UpdatesdistinctState
.protected void
UpdatesleafState
.protected void
UpdatesmatcherCbState
.protected void
UpdatesruleModeState
.protected void
UpdatessuperRulesState
.protected void
UpdatesuniqueState
.Methods inherited from class org.eclipse.m2m.atl.emftvm.impl.NamedElementImpl
getName, setName
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
Methods 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, eVirtualValues
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
Methods inherited from interface org.eclipse.m2m.atl.emftvm.NamedElement
getName, setName
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
-
Field Details
-
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 theEClass
that correspond to this metaclass.- Overrides:
eStaticClass
in classNamedElementImpl
- Returns:
- the
EClass
that 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
Sets the value of the 'Module
' container reference. -
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:
getInputElements
in 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:
getOutputElements
in 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:
getESuperRules
in 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:
getESubRules
in 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:
getMatcher
in 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) -
setMatcher
Sets the value of the 'Matcher
' containment reference.- Specified by:
setMatcher
in 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:
getApplier
in 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) -
setApplier
Sets the value of the 'Applier
' containment reference.- Specified by:
setApplier
in 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:
getPostApply
in 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) -
setPostApply
Sets the value of the 'Post Apply
' containment reference.- Specified by:
setPostApply
in 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:
getSuperRules
in 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:
isAbstract
in 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:
setAbstract
in interfaceRule
- Parameters:
newAbstract
- the new value of the 'Abstract' attribute.- See Also:
-
getFields
Returns the value of the 'Fields' containment reference list. The list contents are of typeField
. It is bidirectional and its opposite is 'Rule
'.If the meaning of the 'Fields' containment reference list isn't clear, there really should be more of a description here...
-
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:
setDefault
in 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:
isDistinctElements
in 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:
setDistinctElements
in 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
#compileState()
before calling this method. -
isWithLeaves
public boolean isWithLeaves()Returns the value of the 'With Leaves' attribute.A rule is with leaves if it has leaf sub-rules. Call
#compileState()
before calling this method.- Specified by:
isWithLeaves
in interfaceRule
- Returns:
- the value of the 'With Leaves' attribute.
- See Also:
-
findField
-
hasField
Returnstrue
iff this rule has any registered fields with the givenname
. -
findStaticField
- Specified by:
findStaticField
in interfaceRule
- Parameters:
context
- the context type of the fieldname
- the operation name- Returns:
- the static
Field
with the given properties, ornull
if none registered
-
hasStaticField
Returnstrue
iff this rule has any registered static fields with the givenname
.- Specified by:
hasStaticField
in interfaceRule
- Parameters:
name
- the field name- Returns:
true
iff this rule has any registered static fields with the givenname
-
registerField
- Specified by:
registerField
in interfaceRule
- Parameters:
field
- theField
to register
-
matchSingle
Matches this rule for the automatic single stage, if applicable. Call#compileState()
before calling this method.- Specified by:
matchSingle
in interfaceRule
- Parameters:
frame
- the stack frame in which to execute the matcher- Returns:
true
iff the rule has any matches
-
matchRecursive
Matches this rule for the automatic recursive stage, if applicable. Call#compileState()
before calling this method.- Specified by:
matchRecursive
in interfaceRule
- Parameters:
frame
- the stack frame in which to execute the matcher- Returns:
- [
true
iff the rule has any matches,true
iff there was a guaranteed final match]
-
matchManual
Matches this rule manually, if applicable. Call#compileState()
before calling this method.- Specified by:
matchManual
in interfaceRule
- Parameters:
frame
- the stack frame in which to execute the matchervalues
- the values to match against- Returns:
- the rule application result, or
null
if the rule did not match
-
matchOne
Matches rule forvaluesMap
. Call#compileState()
before calling this method. -
matchOneOnly
Matches this rule only (without super-rules) forvaluesMap
. Call#compileState()
before calling this method.- Specified by:
matchOneOnly
in interfaceRule
- Parameters:
frame
- the stack frame in which to execute the matchervaluesMap
- the values to match against- Returns:
true
iff the rule matches
-
createTraces
Creates trace elements for the recorded matches for this rule. Call#compileState()
before calling this method.- Specified by:
createTraces
in interfaceRule
- Parameters:
frame
- the stack frame context
-
completeTraceFor
Completestrace
for this rule by creating the output elements. Will create default/unique trace iff mapsTo information exists. Call#compileState()
before calling this method.- Specified by:
completeTraceFor
in interfaceRule
- Parameters:
frame
- the stack frame contexttrace
- the trace to complete- Returns:
true
iff default/unique mappings were defined for the complete list of source elements
-
apply
Applies this rule for the created traces. Call#compileState()
before calling this method. -
postApply
Runs post-applier for this rule for the created traces. Call#compileState()
before calling this method. -
applyFirst
Applies and post-applies this rule for the first recorded match. Call#compileState()
before calling this method.- Specified by:
applyFirst
in interfaceRule
- Parameters:
frame
- the stack frame in which to execute the applier and post-applier- Returns:
true
iff this rule was applied
-
applyOne
Applies this rule totrace
-
applyFor
Applies this rule for the giventrace
. Call#compileState()
before calling this method. -
postApplyFor
Post-applies this rule for the giventrace
. Call#compileState()
before calling this method.- Specified by:
postApplyFor
in 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). Call#compileState()
before calling this method.- Specified by:
getAllESuperRules
in interfaceRule
- Returns:
- the transitive closure of super-rules.
-
createUniqueMapping
Creates a unique trace mapping entry for the source values intrace
, if applicable.- Specified by:
createUniqueMapping
in 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:
compileState
in 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:
resetState
in interfaceRule
-
compileIterables
Compiles the model element iterables for this rule. Call this method whenever any input or in/out model has changed.- Specified by:
compileIterables
in interfaceRule
- Parameters:
env
- the execution environment context
-
clearFields
public void clearFields()Clears the values of all registered fields within this rule.- Specified by:
clearFields
in interfaceRule
-
findInputElement
Finds theInputRuleElement
with the given name within the rule inheritance hierarchy depth-first.- Specified by:
findInputElement
in interfaceRule
- Parameters:
name
- the input element name- Returns:
- the
InputRuleElement
with the given name ornull
-
getUniqueTrace
Returns the unique rule application trace forvalues
, if applicable.- Specified by:
getUniqueTrace
in 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:
eInverseAdd
in 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:
eInverseRemove
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eBasicRemoveFromContainerFeature
public org.eclipse.emf.common.notify.NotificationChain eBasicRemoveFromContainerFeature(org.eclipse.emf.common.notify.NotificationChain msgs) - Overrides:
eBasicRemoveFromContainerFeature
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eGet
- Specified by:
eGet
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eGet
in classNamedElementImpl
-
eSet
- Specified by:
eSet
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eSet
in classNamedElementImpl
-
eUnset
public void eUnset(int featureID) - Specified by:
eUnset
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eUnset
in classNamedElementImpl
-
eIsSet
public boolean eIsSet(int featureID) - Specified by:
eIsSet
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eIsSet
in classNamedElementImpl
-
toString
- Overrides:
toString
in 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
.
-