Object Structure Navigation

M.C. Stewart and R. Toal (USA)


Object structures, Visitor pattern, Reflection, Java trees.


Nearly all nontrivial software applications feature a collection of objects participating in aggregation relationships. Usually, many different operations must navigate these object structures. Non-object oriented platforms define structure elements with variant records, and operations use switch statements to take different actions based on an object's type. In traditional object oriented applications we either give each class methods specific to its own behavior, or employ the visitor pattern. However, these approaches require navigation code to be hard-wired. In this paper we present a comprehensive examination of object structuring and navigation strategies, while introducing three approaches that factor navigation code from the definitions of the objects’ structure and behavior: a hashtable based organization, a standalone navigator for Java trees, and a reflection-based navigation engine. We compare each strategy on a variety of design attributes.

Important Links:

Go Back