Class ValueNotFoundException

  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.eclipse.ocl.examples.impactanalyzer.ValueNotFoundException
All Implemented Interfaces:, VariableValueNotFoundInfo

public class ValueNotFoundException
extends java.lang.RuntimeException
implements VariableValueNotFoundInfo

Thrown when during (partial) OCL evaluation the value of a yet undefined variable is requested from the EvaluationEnvironment. Normally, this exception is expected to occur only when the PartialEvaluatorImpl together with a PartialEcoreEvaluationEnvironment is used. In this case, the VariableExp is remembered together with the variable name. Only in case of an ill-defined configuration would it be possible that the VariableExp is not set and that only the variable name is set.

Axel Uhl (D043530)
See Also:
Serialized Form

Constructor Summary
ValueNotFoundException(java.lang.String variableName)
ValueNotFoundException(java.lang.String variableName, VariableExp<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EParameter> variableExp)
Method Summary
 VariableExp<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EParameter> getVariableExp()
          If the request for the undefined variable was triggered by evaluating a VariableExp, this expression is returned.
 java.lang.String getVariableName()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public ValueNotFoundException(java.lang.String variableName,
                              VariableExp<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EParameter> variableExp)


public ValueNotFoundException(java.lang.String variableName)
Method Detail


public java.lang.String getVariableName()
Specified by:
getVariableName in interface VariableValueNotFoundInfo


public VariableExp<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EParameter> getVariableExp()
If the request for the undefined variable was triggered by evaluating a VariableExp, this expression is returned. In some cases the EvaluationEnvironment.getValueOf(String) method is called without a particular variable expression at hand, e.g., in order to look up the context object which is the value of the "self" variable for which not always a variable expression is available. In those cases, null will be returned.

Specified by:
getVariableExp in interface VariableValueNotFoundInfo