public final class OCLStandardLibraryImpl extends java.lang.Object implements OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
OCLStandardLibrary
for the Ecore environment.Modifier and Type | Field and Description |
---|---|
static OCLStandardLibraryImpl |
INSTANCE
The shared instance of the OCL Standard Library for the UML environment.
|
static org.eclipse.emf.ecore.EObject |
INVALID
The singleton instance of the OclInvalid standard library type.
|
static org.eclipse.emf.ecore.EPackage |
stdlibPackage
The package containing the OCL Standard Library classifiers.
|
Modifier and Type | Method and Description |
---|---|
static org.eclipse.emf.ecore.EClass |
createShadowClass(org.eclipse.emf.ecore.EClassifier classifier)
Creates the shadow class to contain features that an Ecore classifier
cannot contain for itself.
|
static org.eclipse.emf.ecore.EClass |
findShadowClass(org.eclipse.emf.ecore.EClassifier classifier,
org.eclipse.emf.ecore.EPackage pkg)
Finds the shadow class to contain features defined for the
specified OCL
type , if it already exists. |
org.eclipse.emf.ecore.EClassifier |
getBag()
Obtains the generic instance of the
BagType metatype, named
Bag(T). |
org.eclipse.emf.ecore.EClassifier |
getBoolean()
Obtains the instance of the
PrimitiveType metatype, named
Boolean. |
org.eclipse.emf.ecore.EClassifier |
getCollection()
Obtains the generic instance of the
CollectionType metatype, named
Collection(T). |
static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EOperation> |
getExistingOperations(org.eclipse.emf.ecore.EClassifier type)
Obtains the existing operations of the specified type, stored in it
or in a shadow class.
|
org.eclipse.emf.ecore.EClassifier |
getInteger()
Obtains the instance of the
PrimitiveType metatype, named
Integer. |
java.lang.Object |
getInvalid()
Obtains the single instance of the
OclInvalid type,
identified by the token invalid. |
org.eclipse.emf.ecore.EClassifier |
getOclAny()
Obtains the single instance of the
AnyType metatype, named
OclAny. |
org.eclipse.emf.ecore.EClassifier |
getOclElement()
Obtains the generic instance of the
ElementType metatype, named
OclElement. |
org.eclipse.emf.ecore.EClassifier |
getOclExpression()
Obtains the instance of the
ElementType metatype that represents
the type of OCL expressions in the model, named OclExpression. |
org.eclipse.emf.ecore.EClassifier |
getOclInvalid()
Obtains the single instance of the
InvalidType metatype, named
OclInvalid. |
org.eclipse.emf.ecore.EClassifier |
getOclMessage()
Obtains the generic instance of the
MessageType metatype, named
OclMessage. |
org.eclipse.emf.ecore.EClassifier |
getOclType()
Obtains the generic instance of the
TypeType metatype, named
OclType. |
org.eclipse.emf.ecore.EClassifier |
getOclVoid()
Obtains the single instance of the
VoidType metatype, named
OclVoid. |
org.eclipse.emf.ecore.EClassifier |
getOrderedSet()
Obtains the generic instance of the
OrderedSetType metatype, named
OrderedSet(T). |
static org.eclipse.emf.ecore.EClassifier |
getOwner(org.eclipse.emf.ecore.EOperation operation) |
static org.eclipse.emf.ecore.EClassifier |
getOwner(org.eclipse.emf.ecore.EStructuralFeature property) |
org.eclipse.emf.ecore.EClassifier |
getReal()
Obtains the instance of the
PrimitiveType metatype, named
Real. |
static org.eclipse.emf.ecore.EClassifier |
getRealClassifier(org.eclipse.emf.ecore.EClass shadowClass) |
org.eclipse.emf.ecore.EClassifier |
getSequence()
Obtains the generic instance of the
SequenceType metatype, named
Sequence(T). |
org.eclipse.emf.ecore.EClassifier |
getSet()
Obtains the generic instance of the
SetType metatype, named
Set(T). |
org.eclipse.emf.ecore.EClassifier |
getState()
Obtains the instance of the
ElementType metatype that represents
the type of states in the model, named State. |
org.eclipse.emf.ecore.EClassifier |
getString()
Obtains the instance of the
PrimitiveType metatype, named
String. |
org.eclipse.emf.ecore.EClassifier |
getT()
Obtains a generic instance of the
AnyType metatype that represents
the type parameter of generic types and operations, named T. |
org.eclipse.emf.ecore.EClassifier |
getT2()
Obtains a generic instance of the
AnyType metatype that represents
another type parameter of generic operations (particularly certain
OCL Collection operations), named T2. |
org.eclipse.emf.ecore.EClassifier |
getUnlimitedNatural()
Obtains the instance of the
PrimitiveType metatype,
named UnlimitedNatural. |
static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EOperation> |
selectIterators(java.util.Collection<org.eclipse.emf.ecore.EOperation> operations)
Selects from the specified operations those that are collection iterators.
|
static void |
stereotypeAsIterator(java.util.Collection<org.eclipse.emf.ecore.EOperation> operations)
Marks the specified operations as being collection iterators (as distinct
from ordinary operations).
|
public static final OCLStandardLibraryImpl INSTANCE
public static org.eclipse.emf.ecore.EPackage stdlibPackage
public static final org.eclipse.emf.ecore.EObject INVALID
public org.eclipse.emf.ecore.EClassifier getBoolean()
OCLStandardLibrary
PrimitiveType
metatype, named
Boolean.getBoolean
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
PrimitiveType
)public org.eclipse.emf.ecore.EClassifier getInteger()
OCLStandardLibrary
PrimitiveType
metatype, named
Integer.getInteger
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
PrimitiveType
)public org.eclipse.emf.ecore.EClassifier getUnlimitedNatural()
OCLStandardLibrary
PrimitiveType
metatype,
named UnlimitedNatural.getUnlimitedNatural
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
PrimitiveType
)public org.eclipse.emf.ecore.EClassifier getOclInvalid()
OCLStandardLibrary
InvalidType
metatype, named
OclInvalid.getOclInvalid
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
InvalidType
)public org.eclipse.emf.ecore.EClassifier getReal()
OCLStandardLibrary
PrimitiveType
metatype, named
Real.getReal
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
PrimitiveType
)public org.eclipse.emf.ecore.EClassifier getString()
OCLStandardLibrary
PrimitiveType
metatype, named
String.getString
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
PrimitiveType
)public org.eclipse.emf.ecore.EClassifier getOclAny()
OCLStandardLibrary
AnyType
metatype, named
OclAny.getOclAny
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
AnyType
)public org.eclipse.emf.ecore.EClassifier getOclElement()
OCLStandardLibrary
ElementType
metatype, named
OclElement.getOclElement
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
ElementType
)public java.lang.Object getInvalid()
OCLStandardLibrary
OclInvalid
type,
identified by the token invalid.getInvalid
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
invalid
)public org.eclipse.emf.ecore.EClassifier getState()
OCLStandardLibrary
ElementType
metatype that represents
the type of states in the model, named State.getState
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
ElementType
)public org.eclipse.emf.ecore.EClassifier getOclMessage()
OCLStandardLibrary
MessageType
metatype, named
OclMessage.getOclMessage
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
MessageType
)public org.eclipse.emf.ecore.EClassifier getOclType()
OCLStandardLibrary
TypeType
metatype, named
OclType.getOclType
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
TypeType
)public org.eclipse.emf.ecore.EClassifier getOclVoid()
OCLStandardLibrary
VoidType
metatype, named
OclVoid.getOclVoid
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
VoidType
)public org.eclipse.emf.ecore.EClassifier getT()
OCLStandardLibrary
AnyType
metatype that represents
the type parameter of generic types and operations, named T.getT
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
AnyType
)public org.eclipse.emf.ecore.EClassifier getT2()
OCLStandardLibrary
AnyType
metatype that represents
another type parameter of generic operations (particularly certain
OCL Collection
operations), named T2.getT2
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
AnyType
)public org.eclipse.emf.ecore.EClassifier getSet()
OCLStandardLibrary
SetType
metatype, named
Set(T).getSet
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
SetType
)public org.eclipse.emf.ecore.EClassifier getOrderedSet()
OCLStandardLibrary
OrderedSetType
metatype, named
OrderedSet(T).getOrderedSet
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
OrderedSetType
)public org.eclipse.emf.ecore.EClassifier getBag()
OCLStandardLibrary
BagType
metatype, named
Bag(T).getBag
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
BagType
)public org.eclipse.emf.ecore.EClassifier getSequence()
OCLStandardLibrary
SequenceType
metatype, named
Sequence(T).getSequence
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
SequenceType
)public org.eclipse.emf.ecore.EClassifier getCollection()
OCLStandardLibrary
CollectionType
metatype, named
Collection(T).getCollection
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
CollectionType
)public org.eclipse.emf.ecore.EClassifier getOclExpression()
OCLStandardLibrary
ElementType
metatype that represents
the type of OCL expressions in the model, named OclExpression.getOclExpression
in interface OCLStandardLibrary<org.eclipse.emf.ecore.EClassifier>
ElementType
)public static org.eclipse.emf.ecore.EClassifier getOwner(org.eclipse.emf.ecore.EOperation operation)
public static org.eclipse.emf.ecore.EClassifier getOwner(org.eclipse.emf.ecore.EStructuralFeature property)
public static org.eclipse.emf.ecore.EClass createShadowClass(org.eclipse.emf.ecore.EClassifier classifier)
classifier
- an Ecore classifierpublic static org.eclipse.emf.ecore.EClass findShadowClass(org.eclipse.emf.ecore.EClassifier classifier, org.eclipse.emf.ecore.EPackage pkg)
type
, if it already exists.classifier
- an Ecore classifierpkg
- the package in which to look for the shadow classnull
if not
foundpublic static org.eclipse.emf.ecore.EClassifier getRealClassifier(org.eclipse.emf.ecore.EClass shadowClass)
public static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EOperation> getExistingOperations(org.eclipse.emf.ecore.EClassifier type)
null
, not an empty list, if none are found.type
- an OCL pre-defined typenull
if none are foundpublic static void stereotypeAsIterator(java.util.Collection<org.eclipse.emf.ecore.EOperation> operations)
operations
- operations to designate as iteratorspublic static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EOperation> selectIterators(java.util.Collection<org.eclipse.emf.ecore.EOperation> operations)
operations
- operations