code: private void compile2() {
          try {
              switch (compilePolicy) {
              case ATTR_ONLY:
                  attribute(todo);
                  break;
  
              case CHECK_ONLY:
                  flow(attribute(todo));
                  break;
  
              case SIMPLE:
                  generate(desugar(flow(attribute(todo))));
                  break;
  
              case BY_FILE: {
                      Queue<Queue<Env<AttrContext>>> q = todo.groupByFile();
                      while (!q.isEmpty() && !shouldStop(CompileState.ATTR)) {
                          generate(desugar(flow(attribute(q.remove()))));
                      }
                  }
                  break;
  
              case BY_TODO:
                  while (!todo.isEmpty())
                      generate(desugar(flow(attribute(todo.remove()))));
                  break;
  
              default:
                  Assert.error("unknown compile policy");
              }
          } catch (Abort ex) {
              if (devVerbose)
                  ex.printStackTrace(System.err);
          }
  
          if (verbose) {
              elapsed_msec = elapsed(start_msec);
              log.printVerbose("total", Long.toString(elapsed_msec));
          }
  
          reportDeferredDiagnostics();
  
          if (!log.hasDiagnosticListener()) {
              printCount("error", errorCount());
              printCount("warn", warningCount());
          }
      }
docs: The phases following annotation processing: attribution,
  desugar, and finally code generation.