Detailed view of Design Patterns
Remote Method Invocation
Calling methods on remote objects is a powerful service provided by Java. Having to code not only the concrete class but also the interface requires having to do the same task twice, and entails further risks of errors.
These risks no longer exist with the RMI pattern. Furthermore, it is incremental, in other words, it can be applied each time the concrete class is modified.
Sending events
It is often the case in a Java application that you want to trigger an event when the state of an object changes or when it is found in a specific state.
The "Sending events" pattern creates the event class and the interface for the objects that will listen. It also manages notifications.
Listening to events
It is almost impossible to write a Java application without having to listen to events, such as clicking on a button, selecting a text field or moving a gauge.
The "Listening to events' pattern lets you find out when the events will occur ("subscribing" to the events), by creating internal classes that will manage the listening as well as the methods for answering the notifications.
Creating the methods to be implemented
Launching the
"Methods
to be implemented" pattern on a class has the effect of recursively scanning the
implemented interface classes collecting their methods. These methods
are then created in the class. This process is carried out for each of
package's classes.
Processing only takes into account the modeled interfaces and not the {JavaImplements} tagged values.
Creating the methods to be redefined
Launching the "Methods to redefine" pattern on a class has the effect of going recursively through the parent classes and collecting their abstract methods. These methods are then created in the class. This process is carried out for each of the package's classes.
Transforming a class into a non-primitive class
The "Transform
into a non-primitive class" pattern is especially useful for reversed classes. The reverse only produces primitive classes. If a user
wishes to make a reversed class non-primitive, especially to create
associations towards this class, he can use this pattern which will have the
effect of transforming attributes with this type into associations.
Transforming a class into a primitive class
The "Transform
into a primitive class" pattern is the opposite of the previous operation. Its effect is to transform associations towards this class into
attributes.