org.eclipse.gmt.umlx.cst
Class OCLUtils
java.lang.Object
org.eclipse.gmt.umlx.cst.CSTUtils
org.eclipse.gmt.umlx.cst.OCLUtils
public class OCLUtils
- extends CSTUtils
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OCLUtils
public OCLUtils()
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:
- ordered, unique: ordered set type
- ordered, non-unique: sequence type
- non-ordered, unique: set type
- non-ordered, non-unique: bag type
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 forisOrdered
- whether the OCL type should be orderedisUnique
- 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)