Reflection Patterns in the Context of Object and Component Technology

Egbert Althammer · 2001

coupling relies on polymorphism and dynamic binding. The abstract class or interface must declare all the relevant methods of B. Now suppose an alternative way of coupling A and B which requires a semantic convention defined separately, that is, not as part of the signature of the abstract class or interface: B is replaced by the most general class Object so that no particular signature is defined. Thus in order to invoke the methods of B1, (a) A has to be able to find out which methods are available and (b) a semantic convention has to define the meaning of the methods. We introduce the term semantic coupling when two classes are coupled by means of a semantic convention. In the example A and Object are semantically coupled (see also Figure 2.4b). For B1 this means that it does not have to extend a parChapter 2 Selected OO Reflective Architectures 67 ticular abstract class or implement an interface, but its method must adhere to the semantic convention.

Read the paper · More papers on PaperTik