예제 #1
0
    void run(Queue<Env<AttrContext>> list, Iterable<? extends TypeElement> classes) {
      Set<TypeElement> set = new HashSet<TypeElement>();
      for (TypeElement item : classes) set.add(item);

      ListBuffer<Env<AttrContext>> defer = ListBuffer.<Env<AttrContext>>lb();
      while (list.peek() != null) {
        Env<AttrContext> env = list.remove();
        ClassSymbol csym = env.enclClass.sym;
        if (csym != null && set.contains(csym.outermostClass())) process(env);
        else defer = defer.append(env);
      }

      list.addAll(defer);
    }