org.eclipse.ocl.examples.impactanalyzer.deltaPropagation
Class PartialEcoreEvaluationEnvironment

java.lang.Object
  extended by org.eclipse.ocl.AbstractEvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
      extended by org.eclipse.ocl.ecore.EcoreEvaluationEnvironment
          extended by org.eclipse.ocl.examples.impactanalyzer.util.EcoreEvaluationEnvironmentWithScopedExtentMap
              extended by org.eclipse.ocl.examples.impactanalyzer.deltaPropagation.PartialEcoreEvaluationEnvironment
All Implemented Interfaces:
EvaluationEnvironmentWithHiddenOpposites, EvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>, EvaluationEnvironment.Enumerations<org.eclipse.emf.ecore.EEnumLiteral>, Customizable, Adaptable

public class PartialEcoreEvaluationEnvironment
extends EcoreEvaluationEnvironmentWithScopedExtentMap


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.EvaluationEnvironment
EvaluationEnvironment.Enumerations<EL>
 
Constructor Summary
PartialEcoreEvaluationEnvironment(EvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject> parent)
           
PartialEcoreEvaluationEnvironment(PartialEcoreEnvironmentFactory factory, java.lang.Object valueOfSourceExpression)
           
 
Method Summary
 void add(java.lang.String name, java.lang.Object value)
          Adds the supplied name and value binding to the environment
 void clear()
          Clears the environment of variables.
 java.util.Map<org.eclipse.emf.ecore.EClass,java.util.Set<org.eclipse.emf.ecore.EObject>> createExtentMap(java.lang.Object context)
          In addition to the base class implementation, an ExtentMap is also used if context is null but the
 java.lang.Object getValueOf(java.lang.String name)
          Returns the value associated with the supplied name.
 java.lang.Object getValueOf(VariableExp<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EParameter> v)
           
 java.lang.Object remove(java.lang.String name)
          Removes the supplied name and binding from the environment (if it exists) and returns it.
 void replace(java.lang.String name, 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.impactanalyzer.util.EcoreEvaluationEnvironmentWithScopedExtentMap
getFactory
 
Methods inherited from class org.eclipse.ocl.ecore.EcoreEvaluationEnvironment
callOperation, checkOperationReflectionConsistency, createTuple, getInvalidResult, getJavaMethodFor, getType, getValue, isKindOf, isTypeOf, navigateAssociationClass, navigateOppositeProperty, navigateProperty, setOperationReflectionCheckDisabled
 
Methods inherited from class org.eclipse.ocl.AbstractEvaluationEnvironment
basicGetOptions, clearOptions, getAdapter, getOptions, getParent, getValue, isEnabled, overrides, putOptions, removeOption, removeOptions, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartialEcoreEvaluationEnvironment

public PartialEcoreEvaluationEnvironment(PartialEcoreEnvironmentFactory factory,
                                         java.lang.Object valueOfSourceExpression)

PartialEcoreEvaluationEnvironment

public PartialEcoreEvaluationEnvironment(EvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject> parent)
Method Detail

createExtentMap

public java.util.Map<org.eclipse.emf.ecore.EClass,java.util.Set<org.eclipse.emf.ecore.EObject>> createExtentMap(java.lang.Object context)
In addition to the base class implementation, an ExtentMap is also used if context is null but the

Specified by:
createExtentMap in interface EvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Overrides:
createExtentMap in class EcoreEvaluationEnvironmentWithScopedExtentMap
Parameters:
context - a context object in the scope that covers the OCL classifier extents
Returns:
the extent map

getValueOf

public java.lang.Object getValueOf(java.lang.String name)
Returns the value associated with the supplied name. If no value has been set previously, a ValueNotFoundException is thrown.

Specified by:
getValueOf in interface EvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Overrides:
getValueOf in class AbstractEvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Parameters:
name - the name whose value is to be returned
Returns:
the value associated with the name

getValueOf

public java.lang.Object getValueOf(VariableExp<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EParameter> v)

replace

public void replace(java.lang.String name,
                    java.lang.Object value)
Replaces the current value of the supplied name with the supplied value.

Specified by:
replace in interface EvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Overrides:
replace in class AbstractEvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Parameters:
name - the name
value - the new value

add

public void add(java.lang.String name,
                java.lang.Object value)
Adds the supplied name and value binding to the environment

Specified by:
add in interface EvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Overrides:
add in class AbstractEvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Parameters:
name - the name to add
value - the associated binding
See Also:
EvaluationEnvironment.replace(String, Object)

remove

public java.lang.Object remove(java.lang.String name)
Removes the supplied name and binding from the environment (if it exists) and returns it.

Specified by:
remove in interface EvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Overrides:
remove in class AbstractEvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Parameters:
name - the name to remove
Returns:
the value associated with the removed name

clear

public void clear()
Clears the environment of variables.

Specified by:
clear in interface EvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
Overrides:
clear in class AbstractEvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>

toString

public java.lang.String toString()
Returns a string representation of the bindings

Overrides:
toString in class AbstractEvaluationEnvironment<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>