|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ocl.examples.pivot.AbstractBasicEnvironment<EvaluationEnvironment>
org.eclipse.ocl.examples.pivot.evaluation.AbstractEvaluationEnvironment
public abstract class AbstractEvaluationEnvironment
A partial implementation of the 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.
| Field Summary | |
|---|---|
protected MetaModelManager |
metaModelManager
|
| Fields inherited from class org.eclipse.ocl.examples.pivot.AbstractBasicEnvironment |
|---|
parent |
| Constructor Summary | |
|---|---|
protected |
AbstractEvaluationEnvironment(EvaluationEnvironment parent)
|
protected |
AbstractEvaluationEnvironment(MetaModelManager metaModelManager)
|
| Method Summary | |
|---|---|
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(DomainTypedElement referredVariable)
Returns the value associated with the supplied name |
java.util.Set<DomainTypedElement> |
getVariables()
Return the set of all locally registered variables. |
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 |
| Methods inherited from class org.eclipse.ocl.examples.pivot.AbstractBasicEnvironment |
|---|
basicGetOptions, clearOptions, getAdapter, getOptions, getParent, getValue, isEnabled, notOK, putOptions, removeOption, removeOptions, setOption, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.ocl.examples.pivot.evaluation.EvaluationEnvironment |
|---|
createModelManager, getType, navigateAssociationClass |
| Methods inherited from interface org.eclipse.ocl.examples.domain.evaluation.DomainEvaluationEnvironment |
|---|
createVariable |
| Methods inherited from interface org.eclipse.ocl.examples.pivot.Adaptable |
|---|
getAdapter |
| Methods inherited from interface org.eclipse.ocl.examples.pivot.Customizable |
|---|
clearOptions, getOptions, getValue, isEnabled, putOptions, removeOption, removeOptions, setOption |
| Field Detail |
|---|
@NonNull protected final MetaModelManager metaModelManager
| Constructor Detail |
|---|
protected AbstractEvaluationEnvironment(@NonNull
MetaModelManager metaModelManager)
protected AbstractEvaluationEnvironment(@NonNull
EvaluationEnvironment parent)
| Method Detail |
|---|
@NonNull public MetaModelManager getMetaModelManager()
EvaluationEnvironment
getMetaModelManager in interface EvaluationEnvironment
@Nullable
public java.lang.Object getValueOf(@NonNull
DomainTypedElement referredVariable)
getValueOf in interface EvaluationEnvironmentname - the name whose value is to be returned
@NonNull public java.util.Set<DomainTypedElement> getVariables()
EvaluationEnvironment
getVariables in interface EvaluationEnvironment
public void replace(@NonNull
DomainTypedElement referredVariable,
@Nullable
java.lang.Object value)
replace in interface DomainEvaluationEnvironmentreplace in interface EvaluationEnvironmentname - the namevalue - the new value
public 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 remove
public void clear()
clear in interface EvaluationEnvironmentpublic java.lang.String toString()
toString in class java.lang.Object
public 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, -1
true if this evaluation environment provides an
implementation of this operation; false,
otherwise#callOperation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||