code: public void complete(List<JCCompilationUnit> trees, ClassSymbol c) {
          annotate.blockAnnotations();
          ListBuffer<ClassSymbol> prevUncompleted = uncompleted;
          if (typeEnter.completionEnabled) uncompleted = new ListBuffer<>();
  
          try {
              // enter all classes, and construct uncompleted list
              classEnter(trees, null);
  
              // complete all uncompleted classes in memberEnter
              if (typeEnter.completionEnabled) {
                  while (uncompleted.nonEmpty()) {
                      ClassSymbol clazz = uncompleted.next();
                      if (c == null || c == clazz || prevUncompleted == null)
                          clazz.complete();
                      else
                          // defer
                          prevUncompleted.append(clazz);
                  }
  
                  if (!modules.modulesInitialized()) {
                      for (JCCompilationUnit cut : trees) {
                          if (cut.getModuleDecl() != null) {
                              unfinishedModules.append(cut);
                          } else {
                              typeEnter.ensureImportsChecked(List.of(cut));
                          }
                      }
                  } else {
                      typeEnter.ensureImportsChecked(unfinishedModules.toList());
                      unfinishedModules.clear();
                      typeEnter.ensureImportsChecked(trees);
                  }
              }
          } finally {
              uncompleted = prevUncompleted;
              annotate.unblockAnnotations();
          }
      }
docs: Main method: enter classes from the list of toplevel trees, possibly
  skipping TypeEnter for all but 'c' by placing them on the uncompleted
  list.
  @param trees      The list of trees to be processed.
  @param c          The class symbol to be processed or null to process all.