| | Applying the Visitor pattern using reflection (Site not responding. Last check: ) |
 | | The Visitor pattern, as defined in Design Patterns, is great if you're acting on a structure of objects in several different ways, and it makes it easy to change between the actions that you're performing on each, without having to resort to instanceof's or changing the code of the objects you act upon. |
 | | A limitation to the standard implementation of the pattern is that it's not suitable when the classes defining the structure itself are frequently changing, rather than the actions to be applied to them. |
 | | So, the standard Visitor is very useful when you want to perform a number of different operations on one static set of objects, but if the types of objects that you want to act on is changing, it's not so useful. |
| www.surguy.net /articles/visitor-with-reflection.xml (540 words) |