org.eclipse.ocl.examples.pivot.uml
Class UMLOCLEValidator.ConstraintEvaluatorWithDiagnostics

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.utilities.ConstraintEvaluator<java.lang.Boolean>
      extended by org.eclipse.ocl.examples.pivot.uml.UMLOCLEValidator.ConstraintEvaluatorWithDiagnostics
Enclosing class:
UMLOCLEValidator

public static class UMLOCLEValidator.ConstraintEvaluatorWithDiagnostics
extends ConstraintEvaluator<java.lang.Boolean>

ConstraintEvaluatorWithoutDiagnostics provides the richer ConstraintEvaluator support for use when diagnostics are required.


Field Summary
protected  org.eclipse.emf.ecore.EObject diagnosticEObject
           
protected  org.eclipse.emf.common.util.DiagnosticChain diagnostics
           
protected  org.eclipse.emf.ecore.EObject eObject
           
protected  boolean mayUseNewLines
           
 
Fields inherited from class org.eclipse.ocl.examples.pivot.utilities.ConstraintEvaluator
expression
 
Constructor Summary
UMLOCLEValidator.ConstraintEvaluatorWithDiagnostics(ExpressionInOCL expression, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.common.util.DiagnosticChain diagnostics, org.eclipse.emf.ecore.EObject diagnosticEObject, boolean mayUseNewLines)
           
 
Method Summary
protected  java.lang.String getObjectLabel()
          Call-back to provide a description of the context object for use in a diagnostic.
protected  java.lang.Boolean handleExceptionResult(java.lang.Throwable e)
          Call-back to return the appropriate response for an evaluation that was terminated by an exception.
protected  java.lang.Boolean handleFailureResult(java.lang.Object result)
          Call-back to return the appropriate response for a failed evaluation.
protected  java.lang.Boolean handleInvalidExpression(java.lang.String message)
          Call-back to return the appropriate response for an unsuccessful parse of the expression.
protected  java.lang.Boolean handleInvalidResult(InvalidValueException e)
          Call-back to return the appropriate response for an unsuccessful evaluation with an invalid result.
protected  java.lang.Boolean handleSuccessResult()
          Call-back to return the appropriate response for a successful evaluation.
 
Methods inherited from class org.eclipse.ocl.examples.pivot.utilities.ConstraintEvaluator
evaluate, getConstraintName, getConstraintResultMessage, getConstraintResultSeverity, getConstraintResultStatus, getConstraintTypeName, isBooleanConstraint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eObject

@NonNull
protected final org.eclipse.emf.ecore.EObject eObject

diagnostics

@NonNull
protected final org.eclipse.emf.common.util.DiagnosticChain diagnostics

diagnosticEObject

@NonNull
protected final org.eclipse.emf.ecore.EObject diagnosticEObject

mayUseNewLines

protected final boolean mayUseNewLines
Constructor Detail

UMLOCLEValidator.ConstraintEvaluatorWithDiagnostics

public UMLOCLEValidator.ConstraintEvaluatorWithDiagnostics(@NonNull
                                                           ExpressionInOCL expression,
                                                           @NonNull
                                                           org.eclipse.emf.ecore.EObject eObject,
                                                           @NonNull
                                                           org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                           @NonNull
                                                           org.eclipse.emf.ecore.EObject diagnosticEObject,
                                                           boolean mayUseNewLines)
Method Detail

getObjectLabel

protected java.lang.String getObjectLabel()
Description copied from class: ConstraintEvaluator
Call-back to provide a description of the context object for use in a diagnostic.

Specified by:
getObjectLabel in class ConstraintEvaluator<java.lang.Boolean>

handleExceptionResult

protected java.lang.Boolean handleExceptionResult(@NonNull
                                                  java.lang.Throwable e)
Description copied from class: ConstraintEvaluator
Call-back to return the appropriate response for an evaluation that was terminated by an exception.

Specified by:
handleExceptionResult in class ConstraintEvaluator<java.lang.Boolean>

handleFailureResult

protected java.lang.Boolean handleFailureResult(@Nullable
                                                java.lang.Object result)
Description copied from class: ConstraintEvaluator
Call-back to return the appropriate response for a failed evaluation.

Specified by:
handleFailureResult in class ConstraintEvaluator<java.lang.Boolean>

handleInvalidExpression

protected java.lang.Boolean handleInvalidExpression(@NonNull
                                                    java.lang.String message)
Description copied from class: ConstraintEvaluator
Call-back to return the appropriate response for an unsuccessful parse of the expression.

Specified by:
handleInvalidExpression in class ConstraintEvaluator<java.lang.Boolean>

handleInvalidResult

protected java.lang.Boolean handleInvalidResult(@NonNull
                                                InvalidValueException e)
Description copied from class: ConstraintEvaluator
Call-back to return the appropriate response for an unsuccessful evaluation with an invalid result.

Specified by:
handleInvalidResult in class ConstraintEvaluator<java.lang.Boolean>

handleSuccessResult

protected java.lang.Boolean handleSuccessResult()
Description copied from class: ConstraintEvaluator
Call-back to return the appropriate response for a successful evaluation.

Specified by:
handleSuccessResult in class ConstraintEvaluator<java.lang.Boolean>