public class BasicEvaluationEnvironment extends AbstractCustomizable implements EvaluationEnvironment.EvaluationEnvironmentExtension
EvaluationEnvironment interface,
providing some useful common behaviors. Implementors of metamodel-specific
environments are encourage to extend this class rather than implement
an evaluation environment "from scratch."EvaluationEnvironment.EvaluationEnvironmentExtension| Constructor and Description |
|---|
BasicEvaluationEnvironment(EnvironmentFactory environmentFactory,
NamedElement executableObject,
ModelManager modelManager)
Deprecated.
use an executor
|
BasicEvaluationEnvironment(EvaluationEnvironment.EvaluationEnvironmentExtension parent,
NamedElement executableObject,
Object caller) |
BasicEvaluationEnvironment(EvaluationEnvironment.EvaluationEnvironmentExtension parent,
NamedElement executableObject,
OCLExpression caller)
Deprecated.
use TypedElement argument.
|
BasicEvaluationEnvironment(EvaluationEnvironment parent,
NamedElement executableObject)
Deprecated.
supply a callingObject
|
BasicEvaluationEnvironment(ExecutorInternal executor,
NamedElement executableObject) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(TypedElement referredVariable,
Object value)
Adds the supplied referredVariable and value binding to the environment
|
void |
clear()
Clears the environment of variables.
|
void |
dispose()
Dispose of any owned objects.
|
<T> T |
getAdapter(Class<T> adapterType)
Implements the interface method by testing whether I am an instance of
the requested adapter type.
|
EnvironmentFactory |
getEnvironmentFactory() |
NamedElement |
getExecutableObject() |
ExecutorInternal |
getExecutor() |
ModelManager |
getModelManager()
Deprecated.
moved to Evaluator
|
EvaluationEnvironment |
getParent() |
EvaluationEnvironment.EvaluationEnvironmentExtension |
getParentEvaluationEnvironment() |
<T> T |
getValue(Option<T> option)
Obtains the value of the specified option's setting in the my
options map.
|
Object |
getValueOf(TypedElement referredVariable)
Returns the value associated with the supplied referredVariable
|
Set<TypedElement> |
getVariables()
Return the set of all locally registered variables.
|
Object |
remove(TypedElement referredVariable)
Removes the supplied referredVariable and binding from the environment (if it exists)
and returns it.
|
void |
replace(TypedElement referredVariable,
Object value)
Replaces the current value of the supplied referredVariable with the supplied value.
|
String |
toString()
Returns a string representation of the bindings
|
clearOptions, getOptions, isEnabled, putOptions, removeOption, removeOptions, setOptionequals, getClass, hashCode, notify, notifyAll, wait, wait, waitclearOptions, getOptions, isEnabled, putOptions, removeOption, removeOptions, setOption@Deprecated public BasicEvaluationEnvironment(EnvironmentFactory environmentFactory, NamedElement executableObject, ModelManager modelManager)
public BasicEvaluationEnvironment(ExecutorInternal executor, NamedElement executableObject)
@Deprecated public BasicEvaluationEnvironment(EvaluationEnvironment parent, NamedElement executableObject)
public BasicEvaluationEnvironment(EvaluationEnvironment.EvaluationEnvironmentExtension parent, NamedElement executableObject, Object caller)
@Deprecated public BasicEvaluationEnvironment(EvaluationEnvironment.EvaluationEnvironmentExtension parent, NamedElement executableObject, OCLExpression caller)
public void add(TypedElement referredVariable, Object value)
add in interface EvaluationEnvironmentreferredVariable - the referredVariable to addvalue - the associated bindingEvaluationEnvironment.replace(TypedElement, Object)public void clear()
clear in interface EvaluationEnvironmentpublic void dispose()
dispose in interface EvaluationEnvironmentpublic <T> T getAdapter(Class<T> adapterType)
getAdapter in interface AdaptablegetAdapter in class AbstractCustomizableT - the requested adapter interfaceadapterType - the requested adapter interfacenull
if this environment does not adapt to itpublic EnvironmentFactory getEnvironmentFactory()
getEnvironmentFactory in interface EvaluationEnvironmentpublic NamedElement getExecutableObject()
getExecutableObject in interface EvaluationEnvironmentpublic ExecutorInternal getExecutor()
getExecutor in interface EvaluationEnvironment.EvaluationEnvironmentExtension@Deprecated public ModelManager getModelManager()
getModelManager in interface EvaluationEnvironmentpublic EvaluationEnvironment getParent()
public EvaluationEnvironment.EvaluationEnvironmentExtension getParentEvaluationEnvironment()
getParentEvaluationEnvironment in interface EvaluationEnvironment.EvaluationEnvironmentExtensionpublic <T> T getValue(Option<T> option)
CustomizablegetValue in interface CustomizablegetValue in class AbstractCustomizableoption - the option to querypublic Object getValueOf(TypedElement referredVariable)
getValueOf in interface EvaluationEnvironmentreferredVariable - the referredVariable whose value is to be returnedpublic Set<TypedElement> getVariables()
EvaluationEnvironmentgetVariables in interface EvaluationEnvironmentpublic Object remove(TypedElement referredVariable)
remove in interface EvaluationEnvironmentreferredVariable - the referredVariable to removepublic void replace(TypedElement referredVariable, Object value)
replace in interface EvaluationEnvironmentreferredVariable - the referredVariablevalue - the new valueCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.