## Package org.eclipse.ocl.types

Specification of the `Types` package of the Object Constraint Lanuage version 2.0 Abstract Syntax model.

See:
Description

Interface Summary
AnyType<O>: A representation of the model object 'Any Type'
BagType<C,O>: A representation of the model object 'Bag Type'
CollectionType<C,O>: A representation of the model object 'Collection Type'
ElementType: A representation of the model object 'Element Type'
InvalidType<O>: A representation of the model object 'Invalid Type'
MessageType<C,O,P>: A representation of the model object 'Message Type'
OCLStandardLibrary<C>: A representation of the OCL Standard Library, which is the set of singleton instances of the OCL-defined metatypes, including the generic collection types (e.g., `Set(T)`).
OrderedSetType<C,O>: A representation of the model object 'Ordered Set Type'
PrimitiveType<O>: A representation of the model object 'Primitive Type'
SequenceType<C,O>: A representation of the model object 'Sequence Type'
SetType<C,O>: A representation of the model object 'Set Type'
TupleType<O,P>: A representation of the model object 'Tuple Type'
TypesFactory: The Factory for the model.
TypesPackage: The Package for the model.
TypesPackage.Literals: Defines literals for the meta objects that represent each class, each feature of each class, each enum, and each data type
TypeType<C,O>: A representation of the model object 'Type Type'
VoidType<O>: A representation of the model object 'Void Type'

## Package org.eclipse.ocl.types Description

Specification of the `Types` package of the Object Constraint Lanuage version 2.0 Abstract Syntax model.

## Package Specification

This package defines the API for the structure of parsed OCL expressions, as described in the `Types` package of the OCL specification version 2.0 with some extensions for this parser implementation. These extensions include:

- implementation of a `PredefinedType` interface to provide access to the name and operations of the types defined by the OCL Standard Library
- definition of primitive-type metaclasses that the OCL specification erroneously references from UML, where they do not exist; UML only defines the instances (which are M1 classes) of these metaclasses (but not `Real`) and metaclasses for their literal values
- specification of an `OCLStandardLibrary` interface providing access to a particular OCL environment's implementation of the standard library types

None of these extensions of the model affects the XMI serialization of OCL expressions which, as much as possible, is conformant to the OCL specification.

Clients providing metamodel bindings for OCL (i.e., implementations of the `API` are required to define a package of type metaclasses extending those in this package. The OCL specification defines generalizations of all of these types to either the Classifier or DataType metaclasses of the UML (or EMOF or Core::Basic, according to the binding). Thus, providers of OCL bindings must ensure that their implementations of these OCL types specialize the appropriate metaclasses from their metamodels. This ensures that the OCL type system (for a particular environment) is uniform, so that typed elements such as `OCLExpression`s and `Variable`s can be correctly typed by the OCL standard types (and the environment can implement the `OCLStandardLibrary` interface).

See Also:
  `PrimitiveType`, `AnyType`, `CollectionType`, `OCLStandardLibrary`, `TypedElement`

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.