Class ExecEnvImpl
- All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier
,org.eclipse.emf.ecore.EObject
,org.eclipse.emf.ecore.InternalEObject
,ExecEnv
-
Nested Class Summary
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 TypeFieldDescriptionCode block stack level validator.protected static final RuleMode
The default value of the 'Current Phase
' attribute.protected RuleMode
The cached value of the 'Current Phase
' attribute.protected final Map<org.eclipse.emf.ecore.EObject,
org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.DeletionEntry> Queue of elements to be deleted, along with theStackFrame
context in which the deletion takes place.protected final FieldContainer
Field storage and lookup.protected final org.eclipse.emf.common.util.EList<Operation>
The chain of 'init()
' operations to be executed before the automatic rules.Lookup table of (resource -> model).The cached value of the 'Inout Models
' attribute.Lookup table of (resource -> model).The cached value of the 'Input Models
' attribute.protected final Validator<Instruction>
Instruction stack level validator.The internal value of the 'Inout Models
' attribute.The internal value of the 'Input Models
' attribute.The internal value of the 'Meta Models
' attribute.The internal value of the 'Modules
' attribute.The internal value of the 'Output Models
' attribute.protected static final boolean
The default value of the 'Jit Disabled
' attribute.protected boolean
The cached value of the 'Jit Disabled
' attribute.Set of modules that have effectively been loaded.protected final org.eclipse.emf.common.util.EList<Operation>
The chain of 'main()
' operations to be executed after the automatic rules.protected TraceLinkSet
The cached value of the 'Matches
' reference.Lookup table of (metamodel -> ID).Lookup table of (resource -> metamodel).The cached value of the 'Meta Models
' attribute.protected boolean
Model cache initialised?Lookup table of (model -> ID).Lookup table of (resource -> model).The cached value of the 'Modules
' attribute.protected VMMonitor
TheVMMonitor
for the currently running VM instance.Lookup table of (resource -> model).The cached value of the 'Output Models
' attribute.protected final Map<org.eclipse.emf.ecore.EObject,
org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.RemapEntry> Queue of source/target values to be remapped, along with theStackFrame
context in which the remapping takes place.Lookup table for rules: (name -> rule).protected final Queue<org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.QueueEntry>
Queue
of features/fields to be set, along with theStackFrame
context in which the set takes place.protected TraceLinkSet
The cached value of the 'Traces
' reference.The cached value of the 'Unique Results
' attribute.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 TypeMethodDescriptionReturns the value of the 'Matches' reference.Returns the value of the 'Traces' reference.protected void
Caches run-time models in various lookup tables.protected void
Clears the model caches.void
Removes all registered input, in/out, and output models from thisExecEnv
.protected void
Clears model references for aRule
.void
Deletes all elements in the deletion queue.eGet
(int featureID, boolean resolve, boolean coreType) boolean
eIsSet
(int featureID) void
protected org.eclipse.emf.ecore.EClass
Returns theEClass
that correspond to this metaclass.void
eUnset
(int featureID) findOperation
(Object context, String name) findOperation
(Object context, String name, Object parameterType) findOperation
(Object context, String name, Object[] parameterTypes) findStaticField
(Object context, String name) findStaticOperation
(Object context, String name) findStaticOperation
(Object context, String name, Object parameterType) findStaticOperation
(Object context, String name, Object[] parameterTypes) Finds the type for the given (meta-)modelName
andtypeName
.getInoutModelOf
(org.eclipse.emf.ecore.EObject object) Returns the value of the 'Inout Models' attribute.getInputModelOf
(org.eclipse.emf.ecore.EObject object) Returns the value of the 'Input Models' attribute.Returns the JIT compiler instance for this execution environment.Returns the value of the 'Matches' reference.getMetaModel
(org.eclipse.emf.ecore.resource.Resource resource) getMetaModelID
(Metamodel metamodel) Returns the ID under whichmetamodel
is registered within thisExecEnv
.Returns the value of the 'Meta Models' attribute.getModelID
(Model model) Returns the ID under whichmodel
is registered within thisExecEnv
.getModelOf
(org.eclipse.emf.ecore.EObject object) Returns the value of the 'Modules' attribute.getOutputModelOf
(org.eclipse.emf.ecore.EObject object) Returns the value of the 'Output Models' attribute.getRules()
Returns all rules registered in thisExecEnv
.Returns the value of the 'Traces' reference.Returns the value of the 'Unique Results' attribute.boolean
Returnstrue
iff this execution environment has any registered fields with the givenname
.boolean
hasOperation
(String name, int argcount) Returnstrue
iff this execution environment has any registered operations with the givenname
andargcount
.boolean
hasStaticField
(String name) Returnstrue
iff this execution environment has any registered static fields with the givenname
.boolean
hasStaticOperation
(String name, int argcount) Returnstrue
iff this execution environment has any registered static operations with the givenname
andargcount
.boolean
protected boolean
Returns whether the internal state of the rules has been compiled.loadModule
(ModuleResolver resolver, String name) Loads the module with the givenname
and its imports closure into thisExecEnv
using theresolver
, and registers its contents for execution.loadModule
(ModuleResolver resolver, String name, boolean validate) Loads the module with the givenname
and its imports closure into thisExecEnv
using theresolver
, and registers its contents for execution.void
queueForAdd
(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, Object value, int index, StackFrame frame) Queues the given object and value for adding a value to the given feature.void
queueForAdd
(Field field, Object object, Object value, int index, StackFrame frame) Queues the given object and value for adding a value to the given feature.void
queueForDelete
(org.eclipse.emf.ecore.EObject element, StackFrame frame) Queueselement
for deletion.void
queueForRemap
(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target, StackFrame frame) Queues the given source and target value for remapping.void
queueForRemove
(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, Object value, StackFrame frame) Queues the given object and value for removing a value from the given feature.void
queueForRemove
(Field field, Object object, Object value, StackFrame frame) Queues the given object and value for removing a value from the given feature.void
queueForSet
(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, Object value, StackFrame frame) Queues the given object and value for setting the given feature.void
queueForSet
(Field field, Object object, Object value, StackFrame frame) Queues the given object and value for setting the given field.void
queueXmiIDForAdd
(org.eclipse.emf.ecore.EObject object, Object value, int index, StackFrame frame) Queues the given object and value for adding to the XMI ID.void
queueXmiIDForRemove
(org.eclipse.emf.ecore.EObject object, Object value, StackFrame frame) Queues the given object and value for removing from the XMI ID.void
queueXmiIDForSet
(org.eclipse.emf.ecore.EObject object, Object value, StackFrame frame) Queues the given object and value for setting the XMI ID.protected void
registerFeature
(Feature feature) void
registerInOutModel
(String name, Model model) Registersmodel
as an in/out model undername
.void
registerInputModel
(String name, Model model) Registersmodel
as an input model undername
.void
registerMetaModel
(String name, Metamodel metamodel) Registersmetamodel
undername
.void
registerOutputModel
(String name, Model model) Registersmodel
as an output model undername
.protected void
registerRule
(Rule r) void
Processes all element in the "remap" queue.protected void
Sets the JIT compiler instance for this execution environment tonull
.protected void
Resolves model references for aRule
.run
(TimingData timingData) Executes the loaded modules and returns the execution result.void
setJitDisabled
(boolean newJitDisabled) void
setMonitor
(VMMonitor monitor) void
setQueue()
Processes all elements in the "set" queue.protected void
setRuleStateCompiled
(boolean ruleStateCompiled) Sets whether the internal state of the rules has been compiled.toString()
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, eBasicRemoveFromContainerFeature, 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, eInverseAdd, eInverseRemove, 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.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
-
Field Details
-
metaModels
The cached value of the 'Meta Models
' attribute.- See Also:
-
inputModels
The cached value of the 'Input Models
' attribute.- See Also:
-
inoutModels
The cached value of the 'Inout Models
' attribute.- See Also:
-
outputModels
The cached value of the 'Output Models
' attribute.- See Also:
-
modules
The cached value of the 'Modules
' attribute.- See Also:
-
matches
The cached value of the 'Matches
' reference.- See Also:
-
traces
The cached value of the 'Traces
' reference.- See Also:
-
uniqueResults
The cached value of the 'Unique Results
' attribute.- See Also:
-
JIT_DISABLED_EDEFAULT
protected static final boolean JIT_DISABLED_EDEFAULTThe default value of the 'Jit Disabled
' attribute.- See Also:
-
jitDisabled
protected boolean jitDisabledThe cached value of the 'Jit Disabled
' attribute.- See Also:
-
CURRENT_PHASE_EDEFAULT
The default value of the 'Current Phase
' attribute.- See Also:
-
currentPhase
The cached value of the 'Current Phase
' attribute.- See Also:
-
internalMetaModels
The internal value of the 'Meta Models
' attribute. -
internalInputModels
The internal value of the 'Input Models
' attribute. -
internalInoutModels
The internal value of the 'Inout Models
' attribute. -
internalOutputModels
The internal value of the 'Output Models
' attribute. -
internalModules
The internal value of the 'Modules
' attribute. -
loadedModules
Set of modules that have effectively been loaded. Intended for keeping track of cyclic imports. -
mainChain
The chain of 'main()
' operations to be executed after the automatic rules. -
initChain
The chain of 'init()
' operations to be executed before the automatic rules. -
fieldContainer
Field storage and lookup. -
operations
-
staticOperations
-
rules
Lookup table for rules: (name -> rule). -
modelOf
Lookup table of (resource -> model). -
inputModelOf
Lookup table of (resource -> model). -
inoutModelOf
Lookup table of (resource -> model). -
outputModelOf
Lookup table of (resource -> model). -
metaModelOf
Lookup table of (resource -> metamodel). -
modelId
Lookup table of (model -> ID). -
metaModelId
Lookup table of (metamodel -> ID). -
modelCacheInit
protected boolean modelCacheInitModel cache initialised? -
monitor
TheVMMonitor
for the currently running VM instance. -
deletionQueue
protected final Map<org.eclipse.emf.ecore.EObject,org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.DeletionEntry> deletionQueueQueue of elements to be deleted, along with theStackFrame
context in which the deletion takes place. -
setQueue
Queue
of features/fields to be set, along with theStackFrame
context in which the set takes place. -
remapQueue
protected final Map<org.eclipse.emf.ecore.EObject,org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.RemapEntry> remapQueueQueue of source/target values to be remapped, along with theStackFrame
context in which the remapping takes place. Only one queue entry per source value to remap is supported. -
cbStackValidator
Code block stack level validator. -
instrStackValidator
Instruction stack level validator.
-
-
Constructor Details
-
ExecEnvImpl
protected ExecEnvImpl()Creates a newExecEnvImpl
.
-
-
Method Details
-
eStaticClass
protected org.eclipse.emf.ecore.EClass eStaticClass()Returns theEClass
that correspond to this metaclass.- Overrides:
eStaticClass
in classorg.eclipse.emf.ecore.impl.EObjectImpl
- Returns:
- the
EClass
that correspond to this metaclass.
-
getModules
Returns the value of the 'Modules' attribute.If the meaning of the 'Modules' reference list isn't clear, there really should be more of a description here...
- Specified by:
getModules
in interfaceExecEnv
- Returns:
- the value of the 'Modules' attribute.
- See Also:
-
getMatches
Returns the value of the 'Matches' reference.If the meaning of the 'Matches' reference isn't clear, there really should be more of a description here...
- Specified by:
getMatches
in interfaceExecEnv
- Returns:
- the value of the 'Matches' reference.
- See Also:
-
basicGetMatches
Returns the value of the 'Matches' reference.- Returns:
- the value of the 'Matches' reference.
-
getTraces
Returns the value of the 'Traces' reference.If the meaning of the 'Traces' reference isn't clear, there really should be more of a description here...
-
basicGetTraces
Returns the value of the 'Traces' reference.- Returns:
- the value of the 'Traces' reference.
-
getUniqueResults
Returns the value of the 'Unique Results' attribute.If the meaning of the 'Unique Results' attribute isn't clear, there really should be more of a description here...
- Specified by:
getUniqueResults
in interfaceExecEnv
- Returns:
- the value of the 'Unique Results' attribute.
- See Also:
-
isJitDisabled
public boolean isJitDisabled()- Specified by:
isJitDisabled
in interfaceExecEnv
- Returns:
- the value of the 'Jit Disabled' attribute.
- See Also:
-
setJitDisabled
public void setJitDisabled(boolean newJitDisabled) - Specified by:
setJitDisabled
in interfaceExecEnv
- Parameters:
newJitDisabled
- the new value of the 'Jit Disabled' attribute.- See Also:
-
getCurrentPhase
- Specified by:
getCurrentPhase
in interfaceExecEnv
- Returns:
- the value of the 'Current Phase' attribute.
- See Also:
-
getMonitor
Returns the
VMMonitor
for the currently running VM instance.- Specified by:
getMonitor
in interfaceExecEnv
- Returns:
- the
VMMonitor
for the currently running VM instance. - See Also:
-
-
setMonitor
- Specified by:
setMonitor
in interfaceExecEnv
-
registerMetaModel
Registersmetamodel
undername
.- Specified by:
registerMetaModel
in interfaceExecEnv
- Parameters:
name
- the name under which to registermetamodel
- the metamodel to register
-
registerInputModel
Registersmodel
as an input model undername
.- Specified by:
registerInputModel
in interfaceExecEnv
- Parameters:
name
- the name under which to registermodel
- the model to register
-
registerInOutModel
Registersmodel
as an in/out model undername
.- Specified by:
registerInOutModel
in interfaceExecEnv
- Parameters:
name
- the name under which to registermodel
- the model to register
-
registerOutputModel
Registersmodel
as an output model undername
.- Specified by:
registerOutputModel
in interfaceExecEnv
- Parameters:
name
- the name under which to registermodel
- the model to register
-
clearModels
public void clearModels()Removes all registered input, in/out, and output models from thisExecEnv
.- Specified by:
clearModels
in interfaceExecEnv
-
getMetaModel
- Specified by:
getMetaModel
in interfaceExecEnv
- Parameters:
resource
- the EMFResource
of theMetamodel
- Returns:
- the
Metamodel
-
queueForSet
public void queueForSet(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, Object value, StackFrame frame) Queues the given object and value for setting the given feature.- Specified by:
queueForSet
in interfaceExecEnv
- Parameters:
feature
- the feature to setobject
- the object for which to set the featurevalue
- the feature value to setframe
- the stack frame context in which to set the feature value
-
queueForSet
Queues the given object and value for setting the given field.- Specified by:
queueForSet
in interfaceExecEnv
- Parameters:
field
- the field to setobject
- the object for which to set the fieldvalue
- the field value to setframe
- the stack frame context in which to set the field value
-
queueXmiIDForSet
Queues the given object and value for setting the XMI ID.- Specified by:
queueXmiIDForSet
in interfaceExecEnv
- Parameters:
object
- the object for which to set the fieldvalue
- the field value to setframe
- the stack frame context in which to set the field value
-
queueForAdd
public void queueForAdd(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, Object value, int index, StackFrame frame) Queues the given object and value for adding a value to the given feature.- Specified by:
queueForAdd
in interfaceExecEnv
- Parameters:
feature
- the feature to add toobject
- the object for which to add to the featurevalue
- the feature value to addindex
- the index at which to add, or-1
frame
- the stack frame context in which to add to the feature value
-
queueForAdd
Queues the given object and value for adding a value to the given feature.- Specified by:
queueForAdd
in interfaceExecEnv
- Parameters:
field
- the field to add toobject
- the object for which to add to the fieldvalue
- the field value to addindex
- the index at which to add, or-1
frame
- the stack frame context in which to add to the field value
-
queueXmiIDForAdd
public void queueXmiIDForAdd(org.eclipse.emf.ecore.EObject object, Object value, int index, StackFrame frame) Queues the given object and value for adding to the XMI ID.- Specified by:
queueXmiIDForAdd
in interfaceExecEnv
- Parameters:
object
- the object for which to add to the fieldvalue
- the field value to addindex
- the index at which to add, or-1
frame
- the stack frame context in which to add to the field value
-
queueForRemove
public void queueForRemove(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, Object value, StackFrame frame) Queues the given object and value for removing a value from the given feature.- Specified by:
queueForRemove
in interfaceExecEnv
- Parameters:
feature
- the feature to remove fromobject
- the object for which to remove from the featurevalue
- the feature value to removeframe
- the stack frame context in which to remove from the feature value
-
queueForRemove
Queues the given object and value for removing a value from the given feature.- Specified by:
queueForRemove
in interfaceExecEnv
- Parameters:
field
- the field to remove fromobject
- the object for which to remove from the fieldvalue
- the field value to removeframe
- the stack frame context in which to remove from the field value
-
queueXmiIDForRemove
public void queueXmiIDForRemove(org.eclipse.emf.ecore.EObject object, Object value, StackFrame frame) Queues the given object and value for removing from the XMI ID.- Specified by:
queueXmiIDForRemove
in interfaceExecEnv
- Parameters:
object
- the object for which to remove from the fieldvalue
- the field value to removeframe
- the stack frame context in which to remove from the field value
-
setQueue
public void setQueue()Processes all elements in the "set" queue. Sets all queued features and fields, and clears the queue. -
queueForRemap
public void queueForRemap(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target, StackFrame frame) Queues the given source and target value for remapping.- Specified by:
queueForRemap
in interfaceExecEnv
- Parameters:
source
- the source value to remaptarget
- the target value to map toframe
- the stack frame context in which to remap
-
remapQueue
public void remapQueue()Processes all element in the "remap" queue. Remaps all queued source/target value pairs, and clears the queue.- Specified by:
remapQueue
in interfaceExecEnv
-
getMetaModels
Returns the value of the 'Meta Models' attribute. The default value is""
.If the meaning of the 'Meta Models' attribute isn't clear, there really should be more of a description here...
- Specified by:
getMetaModels
in interfaceExecEnv
- Returns:
- the value of the 'Meta Models' attribute.
- See Also:
-
getInputModels
Returns the value of the 'Input Models' attribute. The default value is""
.If the meaning of the 'Input Models' attribute isn't clear, there really should be more of a description here...
- Specified by:
getInputModels
in interfaceExecEnv
- Returns:
- the value of the 'Input Models' attribute.
- See Also:
-
getInoutModels
Returns the value of the 'Inout Models' attribute. The default value is""
.If the meaning of the 'Inout Models' attribute isn't clear, there really should be more of a description here...
- Specified by:
getInoutModels
in interfaceExecEnv
- Returns:
- the value of the 'Inout Models' attribute.
- See Also:
-
getOutputModels
Returns the value of the 'Output Models' attribute. The default value is""
.If the meaning of the 'Output Models' attribute isn't clear, there really should be more of a description here...
- Specified by:
getOutputModels
in interfaceExecEnv
- Returns:
- the value of the 'Output Models' attribute.
- See Also:
-
loadModule
Loads the module with the givenname
and its imports closure into thisExecEnv
using theresolver
, and registers its contents for execution.- Specified by:
loadModule
in interfaceExecEnv
- Parameters:
resolver
- the module file resolvername
- the module name- Returns:
- the loaded module
-
loadModule
Loads the module with the givenname
and its imports closure into thisExecEnv
using theresolver
, and registers its contents for execution.- Specified by:
loadModule
in interfaceExecEnv
- Parameters:
resolver
- the module file resolvername
- the module namevalidate
- iftrue
, validates the loaded bytecode- Returns:
- the loaded module
-
registerFeature
- Parameters:
feature
- theFeature
to register
-
registerRule
- Parameters:
rule
- theRule
to register
-
resolveRuleModels
Resolves model references for aRule
.- Parameters:
rule
- theRule
to resolve
-
clearRuleModels
Clears model references for aRule
.- Parameters:
rule
- theRule
to resolve
-
findOperation
- Specified by:
findOperation
in interfaceExecEnv
- Parameters:
context
- the context type of the operationname
- the operation nameparameterTypes
- the parameter types of the operation- Returns:
- the
Operation
with the given properties, ornull
if none registered
-
findOperation
- Specified by:
findOperation
in interfaceExecEnv
- Parameters:
context
- the context type of the operationname
- the operation name- Returns:
- the
Operation
with the given properties, ornull
if none registered
-
findOperation
- Specified by:
findOperation
in interfaceExecEnv
- Parameters:
context
- the context type of the operationname
- the operation nameparameterType
- the parameter type of the operation- Returns:
- the
Operation
with the given properties, ornull
if none registered
-
hasOperation
Returnstrue
iff this execution environment has any registered operations with the givenname
andargcount
.- Specified by:
hasOperation
in interfaceExecEnv
- Parameters:
name
- the operation nameargcount
- the number of operation arguments (excludingself
)- Returns:
true
iff this execution environment has any registered operations with the givenname
andargcount
-
findStaticOperation
- Specified by:
findStaticOperation
in interfaceExecEnv
- Parameters:
context
- the context type of the operationname
- the operation nameparameterTypes
- the parameter types of the operation- Returns:
- the static
Operation
with the given properties, ornull
if none registered
-
findStaticOperation
- Specified by:
findStaticOperation
in interfaceExecEnv
- Parameters:
context
- the context type of the operationname
- the operation name- Returns:
- the static
Operation
with the given properties, ornull
if none registered
-
findStaticOperation
- Specified by:
findStaticOperation
in interfaceExecEnv
- Parameters:
context
- the context type of the operationname
- the operation nameparameterType
- the parameter type of the operation- Returns:
- the static
Operation
with the given properties, ornull
if none registered
-
hasStaticOperation
Returnstrue
iff this execution environment has any registered static operations with the givenname
andargcount
.- Specified by:
hasStaticOperation
in interfaceExecEnv
- Parameters:
name
- the operation nameargcount
- the number of operation arguments- Returns:
true
iff this execution environment has any registered static operations with the givenname
andargcount
-
findField
-
hasField
Returnstrue
iff this execution environment has any registered fields with the givenname
. -
findStaticField
- Specified by:
findStaticField
in interfaceExecEnv
- 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 execution environment has any registered static fields with the givenname
.- Specified by:
hasStaticField
in interfaceExecEnv
- Parameters:
name
- the field name- Returns:
true
iff this execution environment has any registered static fields with the givenname
-
findRule
-
findType
Finds the type for the given (meta-)modelName
andtypeName
.- Specified by:
findType
in interfaceExecEnv
- Parameters:
modelName
- the name under which the metamodel that contains the type is registeredtypeName
- the type/metaclass name (may be fully qualified using '::
')- Returns:
- the type/metaclass
- Throws:
ClassNotFoundException
- if the type is not found
-
run
Executes the loaded modules and returns the execution result. -
cacheModels
protected void cacheModels()Caches run-time models in various lookup tables. -
clearModelCaches
protected void clearModelCaches()Clears the model caches. -
getRules
Returns all rules registered in thisExecEnv
. -
getModelOf
- Specified by:
getModelOf
in interfaceExecEnv
- Parameters:
object
- the object for which to look up the containing model- Returns:
- the
Model
that containsobject
, ornull
if not found.
-
getModelID
Returns the ID under whichmodel
is registered within thisExecEnv
.- Specified by:
getModelID
in interfaceExecEnv
- Parameters:
model
- the registeredModel
to retrieve the ID for- Returns:
- the ID under which
model
is registered within thisExecEnv
.
-
getMetaModelID
Returns the ID under whichmetamodel
is registered within thisExecEnv
.- Specified by:
getMetaModelID
in interfaceExecEnv
- Parameters:
metamodel
- the registeredMetamodel
to retrieve the ID for- Returns:
- the ID under which
metamodel
is registered within thisExecEnv
.
-
queueForDelete
Queueselement
for deletion.- Specified by:
queueForDelete
in interfaceExecEnv
- Parameters:
element
- the element to deleteframe
- the stack frame context in which to perform the deletion
-
deleteQueue
public void deleteQueue()Deletes all elements in the deletion queue.- Specified by:
deleteQueue
in interfaceExecEnv
-
getInputModelOf
- Specified by:
getInputModelOf
in interfaceExecEnv
- Parameters:
object
- the object for which to look up the containing model- Returns:
- the input
Model
that containsobject
, ornull
if not found.
-
getInoutModelOf
- Specified by:
getInoutModelOf
in interfaceExecEnv
- Parameters:
object
- the object for which to look up the containing model- Returns:
- the in/out
Model
that containsobject
, ornull
if not found.
-
getOutputModelOf
- Specified by:
getOutputModelOf
in interfaceExecEnv
- Parameters:
object
- the object for which to look up the containing model- Returns:
- the output
Model
that containsobject
, ornull
if not found.
-
eGet
- Specified by:
eGet
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eGet
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eSet
- Specified by:
eSet
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eSet
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eUnset
public void eUnset(int featureID) - Specified by:
eUnset
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eUnset
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eIsSet
public boolean eIsSet(int featureID) - Specified by:
eIsSet
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eIsSet
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
toString
- Overrides:
toString
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
getJITCompiler
Returns the JIT compiler instance for this execution environment.- Specified by:
getJITCompiler
in interfaceExecEnv
- Returns:
- the JIT compiler instance
-
resetJITCompiler
protected void resetJITCompiler()Sets the JIT compiler instance for this execution environment tonull
. -
isRuleStateCompiled
protected boolean isRuleStateCompiled()Returns whether the internal state of the rules has been compiled.- Returns:
- the ruleStateCompiled
-
setRuleStateCompiled
protected void setRuleStateCompiled(boolean ruleStateCompiled) Sets whether the internal state of the rules has been compiled.- Parameters:
ruleStateCompiled
- the ruleStateCompiled to set
-