org.javagen.agile.core.visitor
Class GenericWalker

java.lang.Object
  extended by org.javagen.agile.core.visitor.GenericWalker

public final class GenericWalker
extends Object

Traversal part of the visitor pattern implements a depth-first walk across generic model trees. An optional itinerary can be set on the visitor or passed explicitly to limit visitation to a subset of model instances. Children are determined by calling parentModel.allOwnedModels().

Author:
Richard Easterling

Constructor Summary
GenericWalker()
           
 
Method Summary
static void walk(Model model, Visitor visitor)
          Traverse the whole model tree.
static void walk(Model model, Visitor visitor, Set<String> itinerary)
          Traverse the whole model tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericWalker

public GenericWalker()
Method Detail

walk

public static void walk(Model model,
                        Visitor visitor)
Traverse the whole model tree. Visitation will be limited if an itinerary is specified by the visitor.


walk

public static void walk(Model model,
                        Visitor visitor,
                        Set<String> itinerary)
Traverse the whole model tree. Visitation will be limited if an itinerary is specified.



Copyright 2006-2006-2007 Outsource Cafe Inc.. All Rights Reserved.