|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.m2m.atl.engine.emfvm.lib.ExecEnv
public class ExecEnv
Execution environment.
| Constructor Summary | |
|---|---|
ExecEnv(java.util.Map<java.lang.String,IModel> models,
ITool[] tools)
Creates a new execenv parametrized by models. |
|
| Method Summary | |
|---|---|
void |
enterTools(AbstractStackFrame frame)
Enters the tools. |
static java.lang.Object |
findMetaElement(AbstractStackFrame frame,
java.lang.Object mname,
java.lang.Object me)
Finds a meta element by its name. |
Operation |
getAttributeInitializer(java.lang.Object type,
java.lang.String name)
Returns the attribute initializer. |
java.lang.Object |
getHelperValue(AbstractStackFrame frame,
java.lang.Object type,
java.lang.Object element,
java.lang.String name)
Gets the value of an helper. |
IModel |
getModel(java.lang.Object name)
Returns the model by name. |
IModelAdapter |
getModelAdapter()
|
java.lang.String |
getModelNameOf(java.lang.Object element)
Returns the model containing the element. |
IModel |
getModelOf(java.lang.Object element)
Get the model of a given element. |
java.util.Iterator<IModel> |
getModels()
|
java.util.Map<java.lang.String,IModel> |
getModelsByName()
|
java.lang.String |
getNameOf(IModel model)
Returns the model name. |
long |
getNbExecutedBytecodes()
|
Operation |
getOperation(java.lang.Object type,
java.lang.Object name)
Find an operation by its context type and name. |
void |
incNbExecutedBytecodes()
Increments the nbExecutedBytecodes. |
void |
init(IModelAdapter modelAdapterParam)
Initializes the execenv. |
boolean |
isHelper(java.lang.Object type,
java.lang.String name)
Returns true if the given type has a helper with the given name. |
boolean |
isStep()
|
boolean |
isWeavingHelper(java.lang.Object type,
java.lang.String name)
Returns true if there is a weaving helper for the given type and name. |
void |
leaveTools(AbstractStackFrame frame)
Leaves the tools. |
java.lang.Object |
newElement(AbstractStackFrame frame,
java.lang.Object ec)
Creates a new element in the given frame. |
java.lang.Object |
newElement(AbstractStackFrame frame,
java.lang.Object ec,
java.lang.String metamodelName)
Creates a new element in the given frame. |
java.lang.Object |
newElementIn(AbstractStackFrame frame,
java.lang.Object ec,
java.lang.String modelName)
Creates a new element in the given frame and the given model. |
void |
prettyPrint(java.lang.Object value)
Displays a value. |
void |
prettyPrint(java.io.PrintStream out,
java.lang.Object value)
Displays a value. |
void |
prettyPrintCollection(java.io.PrintStream out,
java.util.Collection<?> col)
Display a collection. |
void |
registerHelperAttribute(java.lang.Object type,
java.lang.String name,
java.lang.String initOperationName)
Stores an attribute helper. |
void |
registerOperation(java.lang.Object type,
Operation oper)
Registers operation for a given type. |
void |
registerOperation(java.lang.Object type,
Operation oper,
java.lang.String name)
Deprecated. use registerOperation(Object, Operation) instead |
void |
registerWeavingHelper(java.lang.Object type,
java.lang.String name,
java.lang.String persistTo)
Registers a weaving helper. |
void |
setHelperValue(java.lang.Object element,
java.lang.String name,
java.lang.Object value)
Sets an helper value (only for weaving helpers). |
void |
setStep(boolean step)
|
void |
stepTools(AbstractStackFrame frame)
Steps the tools. |
void |
terminated()
Ends the execution. |
void |
terminateTools()
Terminates the tools. |
java.lang.String |
toPrettyPrintedString(java.lang.Object value)
Converts a value to a displayable string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExecEnv(java.util.Map<java.lang.String,IModel> models,
ITool[] tools)
models - the models maptools - the execution tools| Method Detail |
|---|
public void stepTools(AbstractStackFrame frame)
frame - the framepublic void enterTools(AbstractStackFrame frame)
frame - the framepublic void leaveTools(AbstractStackFrame frame)
frame - the framepublic void terminateTools()
public void init(IModelAdapter modelAdapterParam)
modelAdapterParam - the model adapterpublic java.lang.String getModelNameOf(java.lang.Object element)
element - a model element
public java.lang.String getNameOf(IModel model)
model - a model
public IModel getModel(java.lang.Object name)
name - the model name
public java.util.Iterator<IModel> getModels()
public Operation getOperation(java.lang.Object type,
java.lang.Object name)
type - operation context typename - operation name
public void registerHelperAttribute(java.lang.Object type,
java.lang.String name,
java.lang.String initOperationName)
type - the attribute typename - the attribute nameinitOperationName - the init operation name
public Operation getAttributeInitializer(java.lang.Object type,
java.lang.String name)
type - the attribute typename - the attribute name
public java.lang.Object getHelperValue(AbstractStackFrame frame,
java.lang.Object type,
java.lang.Object element,
java.lang.String name)
frame - the frame contexttype - the helper typeelement - the elementname - the helper value name
public void registerOperation(java.lang.Object type,
Operation oper,
java.lang.String name)
registerOperation(Object, Operation) instead
type - the typeoper - the operationname - the operation name
public void registerOperation(java.lang.Object type,
Operation oper)
type - the typeoper - the operationpublic java.lang.String toPrettyPrintedString(java.lang.Object value)
value - the value to convert
public void prettyPrint(java.lang.Object value)
value - the value to display
public void prettyPrint(java.io.PrintStream out,
java.lang.Object value)
out - the streamvalue - the value to display
public void prettyPrintCollection(java.io.PrintStream out,
java.util.Collection<?> col)
out - the out streamcol - the collection
public static java.lang.Object findMetaElement(AbstractStackFrame frame,
java.lang.Object mname,
java.lang.Object me)
frame - the frame contextmname - the metamodel nameme - the model element
public java.lang.Object newElement(AbstractStackFrame frame,
java.lang.Object ec)
frame - the frame contextec - the element type
public java.lang.Object newElement(AbstractStackFrame frame,
java.lang.Object ec,
java.lang.String metamodelName)
frame - the frame contextec - the element typemetamodelName - the metamodel name
public java.lang.Object newElementIn(AbstractStackFrame frame,
java.lang.Object ec,
java.lang.String modelName)
frame - the frame contextec - the element typemodelName - the model name
public java.util.Map<java.lang.String,IModel> getModelsByName()
public boolean isStep()
public void setStep(boolean step)
public IModelAdapter getModelAdapter()
public long getNbExecutedBytecodes()
public void incNbExecutedBytecodes()
public boolean isWeavingHelper(java.lang.Object type,
java.lang.String name)
type - the helper typename - the helper name
public void registerWeavingHelper(java.lang.Object type,
java.lang.String name,
java.lang.String persistTo)
type - the helper contextname - the helper namepersistTo - the name of the feature to persist
public boolean isHelper(java.lang.Object type,
java.lang.String name)
type - the given typename - the helper name
public void setHelperValue(java.lang.Object element,
java.lang.String name,
java.lang.Object value)
element - the helper contextname - the helper namevalue - the value to setpublic void terminated()
public IModel getModelOf(java.lang.Object element)
element - the given element
|
Copyright 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||