Sciweavers

JUCS
2006

The Language of the Visitor Design Pattern

14 years 12 days ago
The Language of the Visitor Design Pattern
: Design patterns have been developed to cope with the vast space of possible different designs within object-oriented systems. One of those classic patterns is the Visitor Pattern, used for representing an operation to be performed on the elements of an object structure. In general, the order in which the objects are visited is crucial. We present a mapping from the Visitor Pattern to a context free grammar that defines the set of all such visit sequences, a given Visitor can perform. The language defined by this grammar is the language of the Visitor Design Pattern and the mapping encodes knowledge about the class hierarchy and the implementation of the accept methods of a Visitor Design Pattern. It is general enough to model complications that occur when traversing arbitrary object structures, and also properly represents cases such as lack of a common base class, multiple inheritance, and inheritance from concrete classes. Due to its particular design, the grammar can also be used ...
Markus Schordan
Added 13 Dec 2010
Updated 13 Dec 2010
Type Journal
Year 2006
Where JUCS
Authors Markus Schordan
Comments (0)