langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
changeset 43269 12f989542165
parent 43131 7769e4891d5e
child 43368 cabe410a7a5c
equal deleted inserted replaced
43268:12436ebea906 43269:12f989542165
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   361     /**
   361     /**
   362      * Flag set if any implicit source files read.
   362      * Flag set if any implicit source files read.
   363      **/
   363      **/
   364     protected boolean implicitSourceFilesRead;
   364     protected boolean implicitSourceFilesRead;
   365 
   365 
   366     protected boolean enterDone;
   366     private boolean enterDone;
   367 
   367 
   368     protected CompileStates compileStates;
   368     protected CompileStates compileStates;
   369 
   369 
   370     /** Construct a new compiler using a shared context.
   370     /** Construct a new compiler using a shared context.
   371      */
   371      */
  1040     }
  1040     }
  1041 
  1041 
  1042     public List<JCCompilationUnit> initModules(List<JCCompilationUnit> roots) {
  1042     public List<JCCompilationUnit> initModules(List<JCCompilationUnit> roots) {
  1043         modules.initModules(roots);
  1043         modules.initModules(roots);
  1044         if (roots.isEmpty()) {
  1044         if (roots.isEmpty()) {
  1045             enterDone = true;
  1045             enterDone();
  1046         }
  1046         }
  1047         return roots;
  1047         return roots;
  1048     }
  1048     }
  1049 
  1049 
  1050     /**
  1050     /**
  1061             }
  1061             }
  1062         }
  1062         }
  1063 
  1063 
  1064         enter.main(roots);
  1064         enter.main(roots);
  1065 
  1065 
  1066         enterDone = true;
  1066         enterDone();
  1067 
  1067 
  1068         if (!taskListener.isEmpty()) {
  1068         if (!taskListener.isEmpty()) {
  1069             for (JCCompilationUnit unit: roots) {
  1069             for (JCCompilationUnit unit: roots) {
  1070                 TaskEvent e = new TaskEvent(TaskEvent.Kind.ENTER, unit);
  1070                 TaskEvent e = new TaskEvent(TaskEvent.Kind.ENTER, unit);
  1071                 taskListener.finished(e);
  1071                 taskListener.finished(e);
  1723         if (log.compressedOutput) {
  1723         if (log.compressedOutput) {
  1724             log.mandatoryNote(null, "compressed.diags");
  1724             log.mandatoryNote(null, "compressed.diags");
  1725         }
  1725         }
  1726     }
  1726     }
  1727 
  1727 
       
  1728     public void enterDone() {
       
  1729         enterDone = true;
       
  1730         annotate.enterDone();
       
  1731     }
       
  1732 
  1728     public boolean isEnterDone() {
  1733     public boolean isEnterDone() {
  1729         return enterDone;
  1734         return enterDone;
  1730     }
  1735     }
  1731 
  1736 
  1732     /** Close the compiler, flushing the logs
  1737     /** Close the compiler, flushing the logs