langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java
changeset 36526 3b41f1c69604
parent 36497 9c4840131512
child 37644 33cf53901cac
equal deleted inserted replaced
36525:4caf88912b7f 36526:3b41f1c69604
   247                     "-XDshouldStopPolicy=FLOW", "-proc:none");
   247                     "-XDshouldStopPolicy=FLOW", "-proc:none");
   248         }
   248         }
   249 
   249 
   250         AnalyzeTask(final Collection<Unit> units) {
   250         AnalyzeTask(final Collection<Unit> units) {
   251             this(units.stream(), new UnitSourceHandler(),
   251             this(units.stream(), new UnitSourceHandler(),
   252                     "-XDshouldStopPolicy=FLOW", "-Xlint:unchecked", "-proc:none");
   252                     "-XDshouldStopPolicy=FLOW", "-Xlint:unchecked", "-XaddExports:jdk.jshell/jdk.internal.jshell.remote=ALL-UNNAMED", "-proc:none");
   253         }
   253         }
   254 
   254 
   255         <T>AnalyzeTask(final Stream<T> stream, SourceHandler<T> sourceHandler,
   255         <T>AnalyzeTask(final Stream<T> stream, SourceHandler<T> sourceHandler,
   256                 String... extraOptions) {
   256                 String... extraOptions) {
   257             super(stream, sourceHandler, extraOptions);
   257             super(stream, sourceHandler, extraOptions);
   289 
   289 
   290         private final Map<Unit, List<OutputMemoryJavaFileObject>> classObjs = new HashMap<>();
   290         private final Map<Unit, List<OutputMemoryJavaFileObject>> classObjs = new HashMap<>();
   291 
   291 
   292         CompileTask(Collection<Unit> units) {
   292         CompileTask(Collection<Unit> units) {
   293             super(units.stream(), new UnitSourceHandler(),
   293             super(units.stream(), new UnitSourceHandler(),
   294                     "-Xlint:unchecked", "-proc:none");
   294                     "-Xlint:unchecked", "-XaddExports:jdk.jshell/jdk.internal.jshell.remote=ALL-UNNAMED", "-proc:none");
   295         }
   295         }
   296 
   296 
   297         boolean compile() {
   297         boolean compile() {
   298             fileManager.registerClassFileCreationListener(this::listenForNewClassFile);
   298             fileManager.registerClassFileCreationListener(this::listenForNewClassFile);
   299             boolean result = task.call();
   299             boolean result = task.call();