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, setOption
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
clearOptions, 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 EvaluationEnvironment
referredVariable
- the referredVariable to addvalue
- the associated bindingEvaluationEnvironment.replace(TypedElement, Object)
public void clear()
clear
in interface EvaluationEnvironment
public void dispose()
dispose
in interface EvaluationEnvironment
public <T> T getAdapter(Class<T> adapterType)
getAdapter
in interface Adaptable
getAdapter
in class AbstractCustomizable
T
- the requested adapter interfaceadapterType
- the requested adapter interfacenull
if this environment does not adapt to itpublic EnvironmentFactory getEnvironmentFactory()
getEnvironmentFactory
in interface EvaluationEnvironment
public NamedElement getExecutableObject()
getExecutableObject
in interface EvaluationEnvironment
public ExecutorInternal getExecutor()
getExecutor
in interface EvaluationEnvironment.EvaluationEnvironmentExtension
@Deprecated public ModelManager getModelManager()
getModelManager
in interface EvaluationEnvironment
public EvaluationEnvironment getParent()
public EvaluationEnvironment.EvaluationEnvironmentExtension getParentEvaluationEnvironment()
getParentEvaluationEnvironment
in interface EvaluationEnvironment.EvaluationEnvironmentExtension
public <T> T getValue(Option<T> option)
Customizable
getValue
in interface Customizable
getValue
in class AbstractCustomizable
option
- the option to querypublic Object getValueOf(TypedElement referredVariable)
getValueOf
in interface EvaluationEnvironment
referredVariable
- the referredVariable whose value is to be returnedpublic Set<TypedElement> getVariables()
EvaluationEnvironment
getVariables
in interface EvaluationEnvironment
public Object remove(TypedElement referredVariable)
remove
in interface EvaluationEnvironment
referredVariable
- the referredVariable to removepublic void replace(TypedElement referredVariable, Object value)
replace
in interface EvaluationEnvironment
referredVariable
- the referredVariablevalue
- the new valueCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.