Where used: Operation Model


receivesDispatchFrom / dispatchesOperationTo

Method receivesDispatchFrom Object Type

Object Type dispatchesOperationTo Method


Read First: Operation, Object Type, Method, hasMethod/isMethodFor
Read Next: requestsThrough/supportsRequestsFor


This is for choosing a method when invoking polymorphic operations.  An
object type receiving a request to do a certain operation dispatches to
a method via this meta-relation.  The model should be constrained to
have only one method per operation per object type.

If the meta-model is used without optimization, then the object type
must loop through all its methods looking for the one that corresponds
to the operation through the hasMethod/IsMethodFor meta-relation.
Tool-builders for OOIE will probably want to keep indices to improve
performance.



Requesting through multiple object types

The maximum cardinality on the Object Type side is Many so that methods
may be requested through multiple object types.  This means that an
operation requires more than one object type to determine a method to
use.  For example, the particular way to get to a store depends on your
current location.  The GoToStore operation would requests through the
Store object type and the Location object type, which in turn dispatch
to their particular methods.

Operations of this kind are also known as multi-methods in CLOS.


Read First: Operation, Object Type, Method, hasMethod/isMethodFor
Read Next: requestsThrough/supportsRequestsFor