예제 #1
0
 private static void visitChildren(IEntityDefn parent, IEntityDefnVisitor visitor)
     throws Exception {
   for (IEntityDefn child : parent.getChildren()) {
     visitor.accept(child);
     visitChildren(child, visitor);
   }
 }
예제 #2
0
 public static void walk(IEntityDefn entityDefn, IEntityDefnVisitor visitor) {
   try {
     visitor.accept(entityDefn);
     visitChildren(entityDefn, visitor);
   } catch (Exception e) {
     throw WrappedException.wrap(e);
   }
 }