org.eclipse.ocl.internal.helper
Class HelperUtil

java.lang.Object
  extended by org.eclipse.ocl.internal.helper.HelperUtil

public class HelperUtil
extends java.lang.Object

Utility class in support of the implementation of the OCLHelper API, also responsible for the creation of OCLHelpers.

Author:
Yasser Lulu, Christian W. Damus (cdamus)

Method Summary
static
<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
OCLHelper<C,O,P,CT>
createOCLHelper(OCL<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> ocl)
          Creates an OCLHelper for the specified EMF metamodel.
static
<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
java.lang.Object
getConstraintContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, java.lang.Object element, OCLExpression<C> expr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createOCLHelper

public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> OCLHelper<C,O,P,CT> createOCLHelper(OCL<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> ocl)
Creates an OCLHelper for the specified EMF metamodel. The factory creates OCL environments (with the packages, classifiers, states, etc.) from the instances of the metaclasses that mimic OCL/UML classifiers.

The new helper validates the OCL expressions that it parses.

Parameters:
ocl - the metamodel-specific OCL environment
Returns:
the new OCL helper

getConstraintContext

public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> java.lang.Object getConstraintContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                        java.lang.Object element,
                                                                                        OCLExpression<C> expr)