3 Replies Latest reply on Oct 19, 2006 3:22 PM by Scott Stark

    refactoring visitor in VFS

    Bill Burke Master

      The VisitorAttributes usage seems very unclean, why not just change the Visitor interface to be:

      public interface VFSVisitor {

      public boolean visitTreeBranch(VirtualFile vf);
      public void visitLeaf(VirtualFile vf);

      }

      visitTreeBranch() returns true if you want to recurse into it. Gives the developer more control over how to recurse. So, if you want to remove isArchive() the Visitor can still find out if the VF is an "archive" or not by querying the deployment context.