Пример #1
0
 public <A> void modify(ModifierVisitorAdapter a, A arg) {
   final In3Out1<GenericVisitor, Node, Object, Object> mapper = genericFactory.io(a, arg);
   for (int i = 0; i < nodes.length; i++) {
     final Object result = mapper.io(a, nodes[i].out1(), arg);
     nodes[i] = Immutable.immutable1((Node) result);
   }
 }
Пример #2
0
 public <A, R, Vis extends GenericVisitor<R, A>> In3Out1<Vis, Node, A, R> genericVisit(
     Vis vis, A arg) {
   final In3Out1 factory = genericFactory.io(vis, arg);
   return (v, n, a) -> {
     try (Do undo = universalListener.io(n, a)) {
       return (R) factory.io(v, n, a);
     }
   };
 }