1 22 package org.jboss.system.metadata; 23 24 import java.util.Iterator ; 25 import java.util.Set ; 26 27 import org.jboss.util.collection.CollectionsFactory; 28 29 35 public class AbstractMetaDataVisitorNode implements ServiceMetaDataVisitorNode 36 { 37 public Iterator <? extends ServiceMetaDataVisitorNode> getChildren() 38 { 39 Set <ServiceMetaDataVisitorNode> children = CollectionsFactory.createLazySet(); 40 addChildren(children); 41 if (children.size() == 0) 42 return null; 43 else 44 return children.iterator(); 45 } 46 47 public void visit(ServiceMetaDataVisitor visitor) 48 { 49 visitor.visit(this); 50 } 51 52 57 protected void addChildren(Set <ServiceMetaDataVisitorNode> children) 58 { 59 } 60 } 61 | Popular Tags |