Consequences of applying the pattern

 

Model after applying the pattern

 

Figure 145. Transformed model

 

 

Summary of elements created during the transformation

By applying the pattern, the following elements have been created:

·         an internal class for each class of events in which an event has been selected.  The name of this class is the concatenation of the name of the attribute's or association's class on which the pattern has been run, with the name of the attribute or the name of the association's role, whose first letter is put in upper case if required, with the name of the event class, whose first letter is put in upper case if required, and with the "Listener" string.

·         on the internal classes described above, an implementation link towards the interface of the listeners of the event class, if this class contains only one event, otherwise a generalization towards the adapter of the listeners of the event class.

·         on the internal classes described below, the methods for reacting to the selected events.

 

You should now simply enter the body of those methods which react to the events.