|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeResolver<C,O,P>
Definition of a resolver for the dynamically-generated OCL types based on the types
in the user model. It is expected that an implementation of this interface will
cache types for the duration of the associated Environment
and, if
serialization of OCLExpression
s is required, persist them in a
Resource
.
This interface is not intended to be implemented directly by clients; use or
extend the AbstractTypeResolver
class, instead.
See the Environment
class for a description of the
generic type parameters of this class.
Method Summary | |
---|---|
List<P> |
getAdditionalAttributes(C owner)
Obtains the additional attributes defined (via OCL) in the specified classifier context. |
List<O> |
getAdditionalOperations(C owner)
Obtains the additional operations defined (via OCL) in the specified classifier context. |
Resource |
getResource()
Obtains the resource in which the types that I generate are stored for persistence. |
C |
resolve(C type)
Resolves the specified type , returning my own persistent
type instance representing the same OCL type. |
P |
resolveAdditionalAttribute(C owner,
P property)
Resolves the specified "additional attribute" defined by the OCL client on the specified owner type. |
O |
resolveAdditionalOperation(C owner,
O operation)
Resolves the specified "additional operation" defined by the OCL client on the specified owner type. |
CollectionType<C,O> |
resolveCollectionType(CollectionKind kind,
C elementType)
Resolves the collection type of the specified kind and
element type, either created anew or previously created. |
MessageType<C,O,P> |
resolveOperationMessageType(O operation)
Resolves the type for a message expression referencing the specified operation . |
MessageType<C,O,P> |
resolveSignalMessageType(C signal)
Resolves the type for a message expression referencing the specified signal . |
TupleType<O,P> |
resolveTupleType(EList<? extends TypedElement<C>> parts)
Resolves the tuple type consisting of the specified parts ,
in no particular order, either created anew or previously created. |
TypeType<C,O> |
resolveTypeType(C type)
Resolves the type for a type expression referencing the specified type . |
Method Detail |
---|
Resource getResource()
C resolve(C type)
type
, returning my own persistent
type instance representing the same OCL type.
The type
may have been newly created by the parser and be
a duplicate of a type previously resolved, or it may actually be a
type that was previously resolved. In the latter case, the
type
is returned as is. The null
type is
considered to be resolved (i.e., the result is also null
).
Usually, this method will delegate to one of the
resolveXyzType()
methods defined by this interface.
type
- a type to resolve
type
if it is already resolvedCollectionType<C,O> resolveCollectionType(CollectionKind kind, C elementType)
kind
and
element type, either created anew or previously created.
kind
- the kind of collection type to createelementType
- the element type
TupleType<O,P> resolveTupleType(EList<? extends TypedElement<C>> parts)
parts
,
in no particular order, either created anew or previously created. The
resulting type is uniquely defined by the names and types of its parts, and
twp tuple types are considered equal if they have the same number of parts
and their parts correspond one-for-one in name and type (order is not
significant).
parts
- a list of TypedElement
s defining the name and type of
each tuple part. The part names are unique
TypeType<C,O> resolveTypeType(C type)
type
. This is, effectively, the OCL metatype counterpart
for the specified model type.
type
- a model type
MessageType<C,O,P> resolveOperationMessageType(O operation)
operation
.
operation
- the operation call that the message represents
MessageType<C,O,P> resolveSignalMessageType(C signal)
signal
.
signal
- the signal send that the message represents
O resolveAdditionalOperation(C owner, O operation)
owner
type.
owner
- the type on which the additional operation is definedoperation
- the additional operation
List<O> getAdditionalOperations(C owner)
owner
- the context classifier
P resolveAdditionalAttribute(C owner, P property)
owner
type.
owner
- the type on which the additional attribute is definedproperty
- the additional attribute
List<P> getAdditionalAttributes(C owner)
owner
- the context classifier
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |