Demeter/Java is a methodology and programming system that alleviates the burden of maintaining programs with changing class structure by separating class structure and behavior into separate aspects. JavaCC is used to "adaptively" instantiate objects without hard coding their internal structure. A variation of the visitor pattern is used to perform computations on objects without making detailed assumptions about their structure. The combination results in "structure-shy programs" that are robust with respect to changes in the class structure of the application, significantly reducing application development and evolution/maintenance time.
Demeter/Java is also being extended to separate the issues of concurrent and distributed programming from the behavior.
Object-oriented programs are often not right the first time. Especially class organizations need to be adjusted several times. Many of the changes which need to be made can be done semi-automatically by using AP. AP makes the programs easier to evolve by preparing for a large number of changes without having to plan for them in detail. AP allows you to increase the probability that your programs will be very adaptable.
When writing a function f(b:B) the traditional way, the source code of f including all the code which will be called by f, reveals in detail parts of the organization of B. Should this part of the organization change for some other reason than maintenance of f, we still have to maintain f. With AP we can truly hide the detailed organization of B in the source code of f.
While traversal strategies simplify structural evolutions, the visitor/traversal style of programming of Demeter/Java simplifies behavioral evolution. Visitor Pattern related benefits
Written by Karl Lieberherr and Johan Ovlinger