public class QvtOperationalEvaluationEnv extends EcoreEvaluationEnvironment
EvaluationEnvironment.Enumerations<EL>
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
Object value)
Adds the supplied name and value binding to the environment
|
void |
add(String name,
Object value,
EClassifier declaredType)
Adds the supplied name and typed value binding to the environment
|
void |
addModelExtent(ModelParameterExtent extent) |
Object |
assign(EClassifier classifier,
Object oldValue,
Object exprValue,
boolean isReset)
Assigns a RHS
exprValue to a LHS variable or property. |
Object |
callOperation(EOperation operation,
int opcode,
Object source,
Object[] args) |
void |
callSetter(EObject target,
EStructuralFeature eStructuralFeature,
Object exprValue,
boolean valueIsUndefined,
boolean isReset) |
void |
cleanup() |
void |
clear()
Clears the environment of variables.
|
QvtOperationalEvaluationEnv |
cloneEvaluationEnv() |
void |
copyVariableValueFrom(QvtOperationalEvaluationEnv fromEnv,
String varName,
String targetVarName) |
QvtOperationalEvaluationEnv |
createDeferredExecutionEnvironment() |
Map<EClass,Set<EObject>> |
createExtentMap(Object object) |
EObject |
createInstance(EClassifier type,
ModelParameter extent) |
<T> T |
getAdapter(Class<T> adapterType) |
IContext |
getContext() |
ModelParameterExtent |
getDefaultInstantiationExtent(EClassifier type) |
int |
getDepth() |
int |
getMaxStackDepth() |
Set<String> |
getNames() |
ImperativeOperation |
getOperation()
Gets the operation being currently executed.
|
List<Object> |
getOperationArgs() |
Object |
getOperationSelf() |
QvtOperationalEvaluationEnv |
getParent() |
QvtOperationalEvaluationEnv |
getRoot() |
ModuleInstance |
getThisOfType(Module module) |
EClassifier |
getType(Object object) |
EClassifier |
getTypeOf(String name)
Gets the type bound to the variable of the given name.
|
QVTUMLReflection |
getUMLReflection() |
Object |
getValueOf(String name)
Returns the value associated with the supplied name
|
List<Class<? extends QvtGenericVisitorDecorator>> |
getVisitorDecoratorClasses() |
boolean |
isKindOf(Object object,
EClassifier classifier) |
boolean |
isOclInvalid(Object value)
Test whether the give object is OclInvalid retrieved from this
environment.
|
Object |
navigateProperty(EStructuralFeature property,
List<?> qualifiers,
Object target) |
boolean |
overrides(EOperation operation,
int opcode) |
void |
putInstanceToExtent(EObject eObj,
ModelParameter extent) |
Object |
remove(String name)
Removes the supplied name and binding from the environment (if it exists)
and returns it.
|
void |
replace(String name,
Object value)
Replaces the current value of the supplied name with the supplied value.
|
void |
replace(String name,
Object value,
EClassifier declaredType)
Replaces the current value of the supplied name with the supplied value
and type.
|
void |
setOperation(ImperativeOperation myOperation)
Sets the operation being currently executed.
|
void |
setOperationSelf(Object source) |
String |
toString()
Returns a string representation of the bindings
|
createTuple, getValue, isTypeOf, navigateAssociationClass, navigateOppositeProperty, setOperationReflectionCheckDisabled
clearOptions, getOptions, getValue, isEnabled, putOptions, removeOption, removeOptions, setOption
public QvtOperationalEvaluationEnv getRoot()
public int getDepth()
public ModuleInstance getThisOfType(Module module)
public <T> T getAdapter(Class<T> adapterType)
getAdapter
in interface Adaptable
getAdapter
in class AbstractEvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
public Map<EClass,Set<EObject>> createExtentMap(Object object)
createExtentMap
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
createExtentMap
in class EcoreEvaluationEnvironment
public void setOperationSelf(Object source)
public Object getOperationSelf()
public IContext getContext()
public void addModelExtent(ModelParameterExtent extent)
public QVTUMLReflection getUMLReflection()
public void cleanup()
public boolean overrides(EOperation operation, int opcode)
overrides
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
overrides
in class AbstractEvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
public Object callOperation(EOperation operation, int opcode, Object source, Object[] args) throws IllegalArgumentException
callOperation
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
callOperation
in class EcoreEvaluationEnvironment
IllegalArgumentException
public Object navigateProperty(EStructuralFeature property, List<?> qualifiers, Object target) throws IllegalArgumentException
navigateProperty
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
navigateProperty
in class EcoreEvaluationEnvironment
IllegalArgumentException
public QvtOperationalEvaluationEnv getParent()
getParent
in class AbstractEvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
public Object getValueOf(String name)
getValueOf
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
getValueOf
in class AbstractEvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
name
- the name whose value is to be returnedpublic EClassifier getTypeOf(String name)
the
- name of the variableadd(String, Object, EClassifier)
or null
if none is available.add(String, Object, EClassifier)
public boolean isOclInvalid(Object value)
value
- the object to testtrue
if the passed object is
OclInvalid
from this environment;
false
otherwisepublic void copyVariableValueFrom(QvtOperationalEvaluationEnv fromEnv, String varName, String targetVarName)
public void replace(String name, Object value)
replace
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
replace
in class AbstractEvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
name
- the namevalue
- the new valuepublic void replace(String name, Object value, EClassifier declaredType)
name
- the namedeclaredType
- the type of the value known at declaration timevalue
- the new valuepublic void add(String name, Object value)
add
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
add
in class AbstractEvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
name
- the name to addvalue
- the associated bindingpublic void add(String name, Object value, EClassifier declaredType)
name
- the name to adddeclaredType
- the type of the value known at declaration timevalue
- the associated bindingpublic Object remove(String name)
remove
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
remove
in class AbstractEvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
name
- the name to removepublic void clear()
clear
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
clear
in class AbstractEvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
public String toString()
toString
in class AbstractEvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
public boolean isKindOf(Object object, EClassifier classifier)
isKindOf
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
isKindOf
in class EcoreEvaluationEnvironment
public EClassifier getType(Object object)
getType
in interface EvaluationEnvironment<EClassifier,EOperation,EStructuralFeature,EClass,EObject>
getType
in class EcoreEvaluationEnvironment
public EObject createInstance(EClassifier type, ModelParameter extent)
public void putInstanceToExtent(EObject eObj, ModelParameter extent)
public ModelParameterExtent getDefaultInstantiationExtent(EClassifier type)
public Object assign(EClassifier classifier, Object oldValue, Object exprValue, boolean isReset)
exprValue
to a LHS variable or property.classifier
- the LHS classifier of the assignmentoldValue
- the old value of the LHS variable or propertyexprValue
- the RHS value to be assignedisReset
- in case of a collection assignment, indicates whether the current LHS elements should be discarded or notpublic void callSetter(EObject target, EStructuralFeature eStructuralFeature, Object exprValue, boolean valueIsUndefined, boolean isReset)
public int getMaxStackDepth()
public List<Class<? extends QvtGenericVisitorDecorator>> getVisitorDecoratorClasses()
public QvtOperationalEvaluationEnv cloneEvaluationEnv()
public QvtOperationalEvaluationEnv createDeferredExecutionEnvironment()
public void setOperation(ImperativeOperation myOperation)
public ImperativeOperation getOperation()
null
if no operation context is
availableCopyright © 2008, 2018 Borland Software Corporation and others. All Rights Reserved.