Interface ExecEnv
-
- All Superinterfaces:
org.eclipse.emf.ecore.EObject,org.eclipse.emf.common.notify.Notifier
- All Known Implementing Classes:
ExecEnvImpl
public interface ExecEnv extends org.eclipse.emf.ecore.EObjectA representation of the model object 'Exec Env'.- See Also:
EmftvmPackage.getExecEnv()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearModels()Removes all registered input, in/out, and output models from thisExecEnv.voiddeleteQueue()Deletes all elements in the deletion queue.FieldfindField(java.lang.Object context, java.lang.String name)OperationfindOperation(java.lang.Object context, java.lang.String name)OperationfindOperation(java.lang.Object context, java.lang.String name, java.lang.Object parameterType)OperationfindOperation(java.lang.Object context, java.lang.String name, java.lang.Object[] parameterTypes)RulefindRule(java.lang.String name)FieldfindStaticField(java.lang.Object context, java.lang.String name)OperationfindStaticOperation(java.lang.Object context, java.lang.String name)OperationfindStaticOperation(java.lang.Object context, java.lang.String name, java.lang.Object parameterType)OperationfindStaticOperation(java.lang.Object context, java.lang.String name, java.lang.Object[] parameterTypes)java.lang.ObjectfindType(java.lang.String modelName, java.lang.String typeName)Finds the type for the given (meta-)modelNameandtypeName.RuleModegetCurrentPhase()Returns the value of the 'Current Phase' attribute.ModelgetInoutModelOf(org.eclipse.emf.ecore.EObject object)java.util.Map<java.lang.String,Model>getInoutModels()Returns the value of the 'Inout Models' attribute.ModelgetInputModelOf(org.eclipse.emf.ecore.EObject object)java.util.Map<java.lang.String,Model>getInputModels()Returns the value of the 'Input Models' attribute.CodeBlockJITgetJITCompiler()Returns the JIT compiler instance for this execution environment.TraceLinkSetgetMatches()Returns the value of the 'Matches' reference.MetamodelgetMetaModel(org.eclipse.emf.ecore.resource.Resource resource)java.lang.StringgetMetaModelID(Metamodel metamodel)Returns the ID under whichmetamodelis registered within thisExecEnv.java.util.Map<java.lang.String,Metamodel>getMetaModels()Returns the value of the 'Meta Models' attribute.java.lang.StringgetModelID(Model model)Returns the ID under whichmodelis registered within thisExecEnv.ModelgetModelOf(org.eclipse.emf.ecore.EObject object)java.util.Map<java.lang.String,Module>getModules()Returns the value of the 'Modules' attribute.VMMonitorgetMonitor()ModelgetOutputModelOf(org.eclipse.emf.ecore.EObject object)java.util.Map<java.lang.String,Model>getOutputModels()Returns the value of the 'Output Models' attribute.LazyList<Rule>getRules()Returns all rules registered in thisExecEnv.TraceLinkSetgetTraces()Returns the value of the 'Traces' reference.java.util.Map<TraceLink,java.lang.Object>getUniqueResults()Returns the value of the 'Unique Results' attribute.booleanhasField(java.lang.String name)Returnstrueiff this execution environment has any registered fields with the givenname.booleanhasOperation(java.lang.String name, int argcount)Returnstrueiff this execution environment has any registered operations with the givennameandargcount.booleanhasStaticField(java.lang.String name)Returnstrueiff this execution environment has any registered static fields with the givenname.booleanhasStaticOperation(java.lang.String name, int argcount)Returnstrueiff this execution environment has any registered static operations with the givennameandargcount.booleanisJitDisabled()Returns the value of the 'Jit Disabled' attribute.ModuleloadModule(ModuleResolver resolver, java.lang.String name)Loads the module with the givennameand its imports closure into thisExecEnvusing theresolver, and registers its contents for execution.ModuleloadModule(ModuleResolver resolver, java.lang.String name, boolean validate)Loads the module with the givennameand its imports closure into thisExecEnvusing theresolver, and registers its contents for execution.voidqueueForAdd(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, java.lang.Object value, int index, StackFrame frame)Queues the given object and value for adding a value to the given feature.voidqueueForAdd(Field field, java.lang.Object object, java.lang.Object value, int index, StackFrame frame)Queues the given object and value for adding a value to the given feature.voidqueueForDelete(org.eclipse.emf.ecore.EObject element, StackFrame frame)Queueselementfor deletion.voidqueueForRemap(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target, StackFrame frame)Queues the given source and target value for remapping.voidqueueForRemove(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, java.lang.Object value, StackFrame frame)Queues the given object and value for removing a value from the given feature.voidqueueForRemove(Field field, java.lang.Object object, java.lang.Object value, StackFrame frame)Queues the given object and value for removing a value from the given feature.voidqueueForSet(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, java.lang.Object value, StackFrame frame)Queues the given object and value for setting the given feature.voidqueueForSet(Field field, java.lang.Object object, java.lang.Object value, StackFrame frame)Queues the given object and value for setting the given field.voidqueueXmiIDForAdd(org.eclipse.emf.ecore.EObject object, java.lang.Object value, int index, StackFrame frame)Queues the given object and value for adding to the XMI ID.voidqueueXmiIDForRemove(org.eclipse.emf.ecore.EObject object, java.lang.Object value, StackFrame frame)Queues the given object and value for removing from the XMI ID.voidqueueXmiIDForSet(org.eclipse.emf.ecore.EObject object, java.lang.Object value, StackFrame frame)Queues the given object and value for setting the XMI ID.voidregisterInOutModel(java.lang.String name, Model model)Registersmodelas an in/out model undername.voidregisterInputModel(java.lang.String name, Model model)Registersmodelas an input model undername.voidregisterMetaModel(java.lang.String name, Metamodel metamodel)Registersmetamodelundername.voidregisterOutputModel(java.lang.String name, Model model)Registersmodelas an output model undername.voidremapQueue()Processes all element in the "remap" queue.java.lang.Objectrun(TimingData timingData)Executes the loaded modules and returns the execution result.voidsetJitDisabled(boolean value)Sets the value of the 'Jit Disabled' attribute.voidsetMonitor(VMMonitor monitor)voidsetQueue()Processes all elements in the "set" queue.
-
-
-
Method Detail
-
getModules
java.util.Map<java.lang.String,Module> 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...
- Returns:
- the value of the 'Modules' attribute.
- See Also:
EmftvmPackage.getExecEnv_Modules()
-
getMatches
TraceLinkSet 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...
- Returns:
- the value of the 'Matches' reference.
- See Also:
EmftvmPackage.getExecEnv_Matches()
-
getTraces
TraceLinkSet 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...
- Returns:
- the value of the 'Traces' reference.
- See Also:
EmftvmPackage.getExecEnv_Traces()
-
getUniqueResults
java.util.Map<TraceLink,java.lang.Object> 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...
- Returns:
- the value of the 'Unique Results' attribute.
- See Also:
EmftvmPackage.getExecEnv_UniqueResults()
-
isJitDisabled
boolean isJitDisabled()
Returns the value of the 'Jit Disabled' attribute.If the meaning of the 'Jit Disabled' attribute isn't clear, there really should be more of a description here...
- Returns:
- the value of the 'Jit Disabled' attribute.
- See Also:
setJitDisabled(boolean),EmftvmPackage.getExecEnv_JitDisabled()
-
setJitDisabled
void setJitDisabled(boolean value)
Sets the value of the 'Jit Disabled' attribute.- Parameters:
value- the new value of the 'Jit Disabled' attribute.- See Also:
isJitDisabled()
-
getCurrentPhase
RuleMode getCurrentPhase()
Returns the value of the 'Current Phase' attribute. The default value is"manual". The literals are from the enumerationRuleMode.If the meaning of the 'Current Phase' attribute isn't clear, there really should be more of a description here...
- Returns:
- the value of the 'Current Phase' attribute.
- See Also:
RuleMode,EmftvmPackage.getExecEnv_CurrentPhase()
-
getMonitor
VMMonitor getMonitor()
Returns the
VMMonitorfor the currently running VM instance.- Returns:
- the
VMMonitorfor the currently running VM instance. - See Also:
-
setMonitor
void setMonitor(VMMonitor monitor)
-
registerMetaModel
void registerMetaModel(java.lang.String name, Metamodel metamodel)Registersmetamodelundername.- Parameters:
name- the name under which to registermetamodel- the metamodel to register
-
registerInputModel
void registerInputModel(java.lang.String name, Model model)Registersmodelas an input model undername.- Parameters:
name- the name under which to registermodel- the model to register
-
registerInOutModel
void registerInOutModel(java.lang.String name, Model model)Registersmodelas an in/out model undername.- Parameters:
name- the name under which to registermodel- the model to register
-
registerOutputModel
void registerOutputModel(java.lang.String name, Model model)Registersmodelas an output model undername.- Parameters:
name- the name under which to registermodel- the model to register
-
clearModels
void clearModels()
Removes all registered input, in/out, and output models from thisExecEnv.
-
getMetaModel
Metamodel getMetaModel(org.eclipse.emf.ecore.resource.Resource resource)
-
queueForSet
void queueForSet(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, java.lang.Object value, StackFrame frame)Queues the given object and value for setting the given feature.- 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
void queueForSet(Field field, java.lang.Object object, java.lang.Object value, StackFrame frame)
Queues the given object and value for setting the given field.- 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
void queueXmiIDForSet(org.eclipse.emf.ecore.EObject object, java.lang.Object value, StackFrame frame)Queues the given object and value for setting the XMI ID.- 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
void queueForAdd(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, java.lang.Object value, int index, StackFrame frame)Queues the given object and value for adding a value to the given feature.- 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-1frame- the stack frame context in which to add to the feature value
-
queueForAdd
void queueForAdd(Field field, java.lang.Object object, java.lang.Object value, int index, StackFrame frame)
Queues the given object and value for adding a value to the given feature.- 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-1frame- the stack frame context in which to add to the field value
-
queueXmiIDForAdd
void queueXmiIDForAdd(org.eclipse.emf.ecore.EObject object, java.lang.Object value, int index, StackFrame frame)Queues the given object and value for adding to the XMI ID.- Parameters:
object- the object for which to add to the fieldvalue- the field value to addindex- the index at which to add, or-1frame- the stack frame context in which to add to the field value
-
queueForRemove
void queueForRemove(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EObject object, java.lang.Object value, StackFrame frame)Queues the given object and value for removing a value from the given feature.- 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
void queueForRemove(Field field, java.lang.Object object, java.lang.Object value, StackFrame frame)
Queues the given object and value for removing a value from the given feature.- 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
void queueXmiIDForRemove(org.eclipse.emf.ecore.EObject object, java.lang.Object value, StackFrame frame)Queues the given object and value for removing from the XMI ID.- 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
void setQueue()
Processes all elements in the "set" queue. Sets all queued features and fields, and clears the queue.
-
queueForRemap
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.- Parameters:
source- the source value to remaptarget- the target value to map toframe- the stack frame context in which to remap
-
remapQueue
void remapQueue()
Processes all element in the "remap" queue. Remaps all queued source/target value pairs, and clears the queue.
-
getMetaModels
java.util.Map<java.lang.String,Metamodel> 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...
- Returns:
- the value of the 'Meta Models' attribute.
- See Also:
EmftvmPackage.getExecEnv_MetaModels()
-
getInputModels
java.util.Map<java.lang.String,Model> 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...
- Returns:
- the value of the 'Input Models' attribute.
- See Also:
EmftvmPackage.getExecEnv_InputModels()
-
getInoutModels
java.util.Map<java.lang.String,Model> 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...
- Returns:
- the value of the 'Inout Models' attribute.
- See Also:
EmftvmPackage.getExecEnv_InoutModels()
-
getOutputModels
java.util.Map<java.lang.String,Model> 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...
- Returns:
- the value of the 'Output Models' attribute.
- See Also:
EmftvmPackage.getExecEnv_OutputModels()
-
loadModule
Module loadModule(ModuleResolver resolver, java.lang.String name)
Loads the module with the givennameand its imports closure into thisExecEnvusing theresolver, and registers its contents for execution.- Parameters:
resolver- the module file resolvername- the module name- Returns:
- the loaded module
-
loadModule
Module loadModule(ModuleResolver resolver, java.lang.String name, boolean validate)
Loads the module with the givennameand its imports closure into thisExecEnvusing theresolver, and registers its contents for execution.- Parameters:
resolver- the module file resolvername- the module namevalidate- iftrue, validates the loaded bytecode- Returns:
- the loaded module
-
findOperation
Operation findOperation(java.lang.Object context, java.lang.String name, java.lang.Object[] parameterTypes)
- Parameters:
context- the context type of the operationname- the operation nameparameterTypes- the parameter types of the operation- Returns:
- the
Operationwith the given properties, ornullif none registered
-
findOperation
Operation findOperation(java.lang.Object context, java.lang.String name)
- Parameters:
context- the context type of the operationname- the operation name- Returns:
- the
Operationwith the given properties, ornullif none registered
-
findOperation
Operation findOperation(java.lang.Object context, java.lang.String name, java.lang.Object parameterType)
- Parameters:
context- the context type of the operationname- the operation nameparameterType- the parameter type of the operation- Returns:
- the
Operationwith the given properties, ornullif none registered
-
hasOperation
boolean hasOperation(java.lang.String name, int argcount)Returnstrueiff this execution environment has any registered operations with the givennameandargcount.- Parameters:
name- the operation nameargcount- the number of operation arguments (excludingself)- Returns:
trueiff this execution environment has any registered operations with the givennameandargcount
-
findStaticOperation
Operation findStaticOperation(java.lang.Object context, java.lang.String name, java.lang.Object[] parameterTypes)
- Parameters:
context- the context type of the operationname- the operation nameparameterTypes- the parameter types of the operation- Returns:
- the static
Operationwith the given properties, ornullif none registered
-
findStaticOperation
Operation findStaticOperation(java.lang.Object context, java.lang.String name)
- Parameters:
context- the context type of the operationname- the operation name- Returns:
- the static
Operationwith the given properties, ornullif none registered
-
findStaticOperation
Operation findStaticOperation(java.lang.Object context, java.lang.String name, java.lang.Object parameterType)
- Parameters:
context- the context type of the operationname- the operation nameparameterType- the parameter type of the operation- Returns:
- the static
Operationwith the given properties, ornullif none registered
-
hasStaticOperation
boolean hasStaticOperation(java.lang.String name, int argcount)Returnstrueiff this execution environment has any registered static operations with the givennameandargcount.- Parameters:
name- the operation nameargcount- the number of operation arguments- Returns:
trueiff this execution environment has any registered static operations with the givennameandargcount
-
findField
Field findField(java.lang.Object context, java.lang.String name)
- Parameters:
context- the context type of the fieldname- the operation name- Returns:
- the
Fieldwith the given properties, ornullif none registered
-
hasField
boolean hasField(java.lang.String name)
Returnstrueiff this execution environment has any registered fields with the givenname.- Parameters:
name- the field name- Returns:
trueiff this execution environment has any registered fields with the givenname
-
findStaticField
Field findStaticField(java.lang.Object context, java.lang.String name)
- Parameters:
context- the context type of the fieldname- the operation name- Returns:
- the static
Fieldwith the given properties, ornullif none registered
-
hasStaticField
boolean hasStaticField(java.lang.String name)
Returnstrueiff this execution environment has any registered static fields with the givenname.- Parameters:
name- the field name- Returns:
trueiff this execution environment has any registered static fields with the givenname
-
findRule
Rule findRule(java.lang.String name)
- Parameters:
name- the rule name- Returns:
- the
Rulewith the given name, ornullif none registered
-
findType
java.lang.Object findType(java.lang.String modelName, java.lang.String typeName) throws java.lang.ClassNotFoundExceptionFinds the type for the given (meta-)modelNameandtypeName.- 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:
java.lang.ClassNotFoundException- if the type is not found
-
run
java.lang.Object run(TimingData timingData)
Executes the loaded modules and returns the execution result.- Parameters:
timingData- the timing data object, ornull- Returns:
- the execution result of the last loaded module's
mainoperation
-
getRules
LazyList<Rule> getRules()
Returns all rules registered in thisExecEnv.- Returns:
- all rules registered in this
ExecEnv.
-
getModelOf
Model getModelOf(org.eclipse.emf.ecore.EObject object)
- Parameters:
object- the object for which to look up the containing model- Returns:
- the
Modelthat containsobject, ornullif not found.
-
getModelID
java.lang.String getModelID(Model model)
Returns the ID under whichmodelis registered within thisExecEnv.
-
getMetaModelID
java.lang.String getMetaModelID(Metamodel metamodel)
Returns the ID under whichmetamodelis registered within thisExecEnv.
-
queueForDelete
void queueForDelete(org.eclipse.emf.ecore.EObject element, StackFrame frame)Queueselementfor deletion.- Parameters:
element- the element to deleteframe- the stack frame context in which to perform the deletion
-
deleteQueue
void deleteQueue()
Deletes all elements in the deletion queue.
-
getInputModelOf
Model getInputModelOf(org.eclipse.emf.ecore.EObject object)
- Parameters:
object- the object for which to look up the containing model- Returns:
- the input
Modelthat containsobject, ornullif not found.
-
getInoutModelOf
Model getInoutModelOf(org.eclipse.emf.ecore.EObject object)
- Parameters:
object- the object for which to look up the containing model- Returns:
- the in/out
Modelthat containsobject, ornullif not found.
-
getOutputModelOf
Model getOutputModelOf(org.eclipse.emf.ecore.EObject object)
- Parameters:
object- the object for which to look up the containing model- Returns:
- the output
Modelthat containsobject, ornullif not found.
-
getJITCompiler
CodeBlockJIT getJITCompiler()
Returns the JIT compiler instance for this execution environment.- Returns:
- the JIT compiler instance
-
-