mercoledì 22 luglio 2009

Pattern Visitor

Hi Folks,
today has been the OOP days, so I delighted myself with patterns! In particular I used the dear old Visitor Pattern in order to traverse a tree graph and do different tasks. As you know, Visitor uses the double dispatch technique in order to decouple elements from visitors, through accept() and visit() methods. Well I found this interesting paper suggesting the use of reflection techniques to avoid the accept() methods on element objects.

Nessun commento:

Posta un commento