Class AdaptableRuleBase
- java.lang.Object
-
- org.eclipse.viatra.transformation.evm.api.RuleBase
-
- org.eclipse.viatra.transformation.evm.api.adapter.AdaptableRuleBase
-
public class AdaptableRuleBase extends RuleBase
ARuleBase
that allowsIEVMListener
s to listen to the creation and removal of EVMRuleSpecification
s
-
-
Field Summary
Fields Modifier and Type Field Description protected AdaptableEVM
vm
-
Fields inherited from class org.eclipse.viatra.transformation.evm.api.RuleBase
agenda, eventRealm, logger, ruleInstanceTable
-
-
Constructor Summary
Constructors Constructor Description AdaptableRuleBase(EventRealm eventRealm, Agenda agenda, AdaptableEVM adapterContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dispose()
Disposes of each rule instance managed by the agenda.protected <EventAtom>
RuleInstance<EventAtom>instantiateRule(RuleSpecification<EventAtom> specification, EventFilter<? super EventAtom> filter)
Instantiates the given specification over the EventRealm of the RuleBase.protected <EventAtom>
booleanremoveRule(RuleSpecification<EventAtom> specification, EventFilter<? super EventAtom> filter)
Removes and disposes of a rule instance with the given specification.-
Methods inherited from class org.eclipse.viatra.transformation.evm.api.RuleBase
createScopedConflictSet, findInstance, getAgenda, getEventRealm, getInstance, getLogger, getRuleInstances, getRuleSpecificationMultimap, removeRule
-
-
-
-
Field Detail
-
vm
protected final AdaptableEVM vm
-
-
Constructor Detail
-
AdaptableRuleBase
public AdaptableRuleBase(EventRealm eventRealm, Agenda agenda, AdaptableEVM adapterContainer)
-
-
Method Detail
-
instantiateRule
protected <EventAtom> RuleInstance<EventAtom> instantiateRule(RuleSpecification<EventAtom> specification, EventFilter<? super EventAtom> filter)
Description copied from class:RuleBase
Instantiates the given specification over the EventRealm of the RuleBase. If the specification was already instantiated, the existing instance is returned.- Overrides:
instantiateRule
in classRuleBase
- Parameters:
specification
- the rule to be instantiated- Returns:
- the created or existing rule instance
-
removeRule
protected <EventAtom> boolean removeRule(RuleSpecification<EventAtom> specification, EventFilter<? super EventAtom> filter)
Description copied from class:RuleBase
Removes and disposes of a rule instance with the given specification.- Overrides:
removeRule
in classRuleBase
filter
- the partial match used as filter- Returns:
- true, if the specification had an instance in the RuleBase
-
-