Home

Patterns for Encapsulating Class Trees


Author(s) : James O. Coplien M. Vlissides Edited John Dirk Riehle Norman L. Kerth, 
Publisher : N/A
Publication Date : 1996
ISSN : N/A
Abstract : Good object-oriented design firmly relies on abstract classes. They define the interface to work with subclasses that implement them. If clients directly name these subclasses, they become dependent on them. This complicates both system configuration and evolution. The patterns of Late Creation and Class Retrieval presented in this paper overcome these problems by encapsulating class trees behind their root classes. Clients use class specifications to retrieve classes and create objects. Classes can be removed and plugged into the class tree more easily. Thus, encapsulating class trees eases system evolution and configuration of system variants. The patterns of this paper are presented using a new variation of the pattern form. We start by outlining the overall background on which the patterns emerge. This background explains what the patterns are relevant for and what they achieve. It is the overall pattern context and the recursive closure of all subsequent pattern contexts. After introducing the background, we present each pattern in a subsection of its own. A subsection mainly consists of a pattern/context pair that separates the actual pattern from the embedding context. This is based on our understanding of a,