[jboss-dev-forums] [Design of POJO Server] - refactoring visitor in VFS
bill.burke@jboss.com
do-not-reply at jboss.com
Thu Oct 5 11:28:32 EDT 2006
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.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976331#3976331
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976331
More information about the jboss-dev-forums
mailing list