org.eclipse.gmt.umlx.ocl.cst
Class OCLUtils

java.lang.Object
  extended by org.eclipse.gmt.umlx.cst.CSTUtils
      extended by org.eclipse.gmt.umlx.ocl.cst.OCLUtils

public class OCLUtils
extends org.eclipse.gmt.umlx.cst.CSTUtils


Field Summary
static java.lang.String OCL_ORPHANS_PACKAGE_NAME
           
 
Constructor Summary
OCLUtils()
           
 
Method Summary
static org.eclipse.ocl.expressions.CollectionKind commonCollectionKind(org.eclipse.ocl.expressions.CollectionKind kind1, org.eclipse.ocl.expressions.CollectionKind kind2)
           
static java.lang.String getKindName(org.eclipse.ocl.expressions.CollectionKind collectionKind)
           
static org.eclipse.emf.ecore.EClassifier getOCLCollectionType(org.eclipse.emf.ecore.EClassifier type, boolean isOrdered, boolean isUnique)
          Obtains the appropriate OCL collection type for an EClassifier, according to the collection's orderedness and uniqueness.
static boolean isOrdered(org.eclipse.ocl.expressions.CollectionKind collectionKind)
           
static boolean isUnique(org.eclipse.ocl.expressions.CollectionKind collectionKind)
           
static boolean isUnresolved(org.eclipse.emf.ecore.EClassifier eClassifier)
           
 
Methods inherited from class org.eclipse.gmt.umlx.cst.CSTUtils
asClassUnchecked, getNamedElement, getNamedElement, splice
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OCL_ORPHANS_PACKAGE_NAME

public static final java.lang.String OCL_ORPHANS_PACKAGE_NAME
See Also:
Constant Field Values
Constructor Detail

OCLUtils

public OCLUtils()
Method Detail

commonCollectionKind

public static org.eclipse.ocl.expressions.CollectionKind commonCollectionKind(org.eclipse.ocl.expressions.CollectionKind kind1,
                                                                              org.eclipse.ocl.expressions.CollectionKind kind2)

getKindName

public static java.lang.String getKindName(org.eclipse.ocl.expressions.CollectionKind collectionKind)

getOCLCollectionType

public static org.eclipse.emf.ecore.EClassifier getOCLCollectionType(org.eclipse.emf.ecore.EClassifier type,
                                                                     boolean isOrdered,
                                                                     boolean isUnique)
Obtains the appropriate OCL collection type for an EClassifier, according to the collection's orderedness and uniqueness. The mapping is as follows:

Note that the collection's element type is mapped to an OCL primitive type where possible.

Parameters:
type - the type to get the corresponding OCL collection type for
isOrdered - whether the OCL type should be ordered
isUnique - whether the OCL type should be unique
Returns:
the corresponding OCL type

isOrdered

public static boolean isOrdered(org.eclipse.ocl.expressions.CollectionKind collectionKind)

isUnresolved

public static boolean isUnresolved(org.eclipse.emf.ecore.EClassifier eClassifier)

isUnique

public static boolean isUnique(org.eclipse.ocl.expressions.CollectionKind collectionKind)