org.eclipse.ocl.examples.impactanalyzer.util
Class OCL

java.lang.Object
  extended by org.eclipse.ocl.examples.impactanalyzer.util.OCL

public class OCL
extends java.lang.Object

Eases the construction of an OCL instance configured with a specific OppositeEndFinder. The OCL environments returned by the operations on this class use the ExtentMap which is consistently defined via the OppositeEndFinder.getAllInstancesSeenBy(org.eclipse.emf.ecore.EClass, org.eclipse.emf.common.notify.Notifier) operation definition of the OppositeEndFinder used.

If no specific OppositeEndFinder is provided, e.g. by using newInstance(), the DefaultOppositeEndFinder will be used consistently, also for the definition of the ExtentMap.

Author:
Axel Uhl (D043530)

Constructor Summary
OCL()
           
 
Method Summary
static OCL newInstance()
          Constructs an OCL instance that uses a DefaultOppositeEndFinder and the default package registry, yet uses the non-default ExtentMap which defines allInstances results consistently with the opposite end finder being used.
static OCL newInstance(EcoreEnvironmentFactoryWithScopedExtentMap factory)
          Constructs an OCL instance that uses the provided factory's opposite end finder and registry, yet uses the non-default ExtentMap which defines allInstances results consistently with the opposite end finder being used.
static OCL newInstance(org.eclipse.emf.ecore.EPackage.Registry registry)
          Constructs the OCL instance so that metamodel lookups are performed with the registry provided.
static OCL newInstance(org.eclipse.emf.ecore.EPackage.Registry registry, OppositeEndFinder oppositeEndFinder)
          Uses the specific opposite end finder to parameterize the OCL environment returned.
static OCL newInstance(OppositeEndFinder oppositeEndFinder)
          Uses the specific opposite end finder to parameterize the OCL environment returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OCL

public OCL()
Method Detail

newInstance

public static OCL newInstance()
Constructs an OCL instance that uses a DefaultOppositeEndFinder and the default package registry, yet uses the non-default ExtentMap which defines allInstances results consistently with the opposite end finder being used.


newInstance

public static OCL newInstance(EcoreEnvironmentFactoryWithScopedExtentMap factory)
Constructs an OCL instance that uses the provided factory's opposite end finder and registry, yet uses the non-default ExtentMap which defines allInstances results consistently with the opposite end finder being used.


newInstance

public static OCL newInstance(org.eclipse.emf.ecore.EPackage.Registry registry)
Constructs the OCL instance so that metamodel lookups are performed with the registry provided. A DefaultOppositeEndFinder is used for hidden opposite retrieval/navigation as well as for allInstances evaluation.


newInstance

public static OCL newInstance(OppositeEndFinder oppositeEndFinder)
Uses the specific opposite end finder to parameterize the OCL environment returned. The opposite end finder is used consistently for all hidden opposite property retrievals and navigations as well as for allInstances operation calls by means of an ExtentMap parameterized with this opposite end finder.

Parameters:
oppositeEndFinder - if null, a DefaultOppositeEndFinder is used instead.

newInstance

public static OCL newInstance(org.eclipse.emf.ecore.EPackage.Registry registry,
                              OppositeEndFinder oppositeEndFinder)
Uses the specific opposite end finder to parameterize the OCL environment returned. The opposite end finder is used consistently for all hidden opposite property retrievals and navigations as well as for allInstances operation calls by means of an ExtentMap parameterized with this opposite end finder.

Parameters:
registry - the package registry to use for metamodel package lookups
oppositeEndFinder - if null, a DefaultOppositeEndFinder is used instead.