public abstract class AbstractEvaluationEnvironment extends AbstractBasicEnvironment<EvaluationEnvironment> implements EvaluationEnvironment
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."
See the Environment class for a description of the
generic type parameters of this class.
Since the 1.2 release, this interface is Adaptable to support the
optional adapter protocols such as EvaluationEnvironment.Enumerations
and Customizable.
| Modifier and Type | Field and Description |
|---|---|
protected MetaModelManager |
metaModelManager |
parent| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEvaluationEnvironment(EvaluationEnvironment parent) |
protected |
AbstractEvaluationEnvironment(MetaModelManager metaModelManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(DomainTypedElement referredVariable,
java.lang.Object value)
Adds the supplied name and value binding to the environment
|
void |
clear()
Clears the environment of variables.
|
MetaModelManager |
getMetaModelManager()
Obtains the Java-language value of the specified enumeration literal.
|
java.lang.Object |
getValueOf(VariableDeclaration referredVariable)
Returns the value associated with the supplied name
|
boolean |
overrides(Operation operation,
int opcode)
By default, a subclass will not support overriding the operations defined
by the OCL Standard Library.
|
java.lang.Object |
remove(DomainTypedElement referredVariable)
Deprecated.
|
void |
replace(DomainTypedElement referredVariable,
java.lang.Object value)
Replaces the current value of the supplied name with the supplied value.
|
java.lang.String |
toString()
Returns a string representation of the bindings
|
basicGetOptions, clearOptions, getAdapter, getOptions, getParent, getValue, isEnabled, notOK, putOptions, removeOption, removeOptions, setOption, setParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateModelManager, getType, navigateAssociationClasscreateVariablegetAdapterclearOptions, getOptions, getValue, isEnabled, putOptions, removeOption, removeOptions, setOption@NonNull protected final MetaModelManager metaModelManager
protected AbstractEvaluationEnvironment(@NonNull
MetaModelManager metaModelManager)
protected AbstractEvaluationEnvironment(@NonNull
EvaluationEnvironment parent)
@NonNull public MetaModelManager getMetaModelManager()
EvaluationEnvironmentgetMetaModelManager in interface EvaluationEnvironment@Nullable
public java.lang.Object getValueOf(@NonNull
VariableDeclaration referredVariable)
getValueOf in interface EvaluationEnvironmentname - the name whose value is to be returnedpublic void replace(@NonNull
DomainTypedElement referredVariable,
@Nullable
java.lang.Object value)
replace in interface DomainEvaluationEnvironmentreplace in interface EvaluationEnvironmentname - the namevalue - the new valuepublic void add(@NonNull
DomainTypedElement referredVariable,
@Nullable
java.lang.Object value)
add in interface DomainEvaluationEnvironmentadd in interface EvaluationEnvironmentname - the name to addvalue - the associated binding#replace(String, Object)@Deprecated
public java.lang.Object remove(@NonNull
DomainTypedElement referredVariable)
remove in interface EvaluationEnvironmentname - the name to removepublic void clear()
clear in interface EvaluationEnvironmentpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean overrides(@NonNull
Operation operation,
int opcode)
false.overrides in interface EvaluationEnvironmentoperation - an OCL operationopcode - the operation code, if one of the operations pre-defined
by OCL. Otherwise, -1true if this evaluation environment provides an
implementation of this operation; false,
otherwise#callOperation