src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2018, 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 |
80 import com.sun.tools.javac.util.Convert; |
80 import com.sun.tools.javac.util.Convert; |
81 import com.sun.tools.javac.util.DefinedBy; |
81 import com.sun.tools.javac.util.DefinedBy; |
82 import com.sun.tools.javac.util.DefinedBy.Api; |
82 import com.sun.tools.javac.util.DefinedBy.Api; |
83 import com.sun.tools.javac.util.Iterators; |
83 import com.sun.tools.javac.util.Iterators; |
84 import com.sun.tools.javac.util.JCDiagnostic; |
84 import com.sun.tools.javac.util.JCDiagnostic; |
85 import com.sun.tools.javac.util.JDK9Wrappers.Module; |
|
86 import com.sun.tools.javac.util.JavacMessages; |
85 import com.sun.tools.javac.util.JavacMessages; |
87 import com.sun.tools.javac.util.List; |
86 import com.sun.tools.javac.util.List; |
88 import com.sun.tools.javac.util.Log; |
87 import com.sun.tools.javac.util.Log; |
89 import com.sun.tools.javac.util.MatchingUtils; |
88 import com.sun.tools.javac.util.MatchingUtils; |
90 import com.sun.tools.javac.util.ModuleHelper; |
89 import com.sun.tools.javac.util.ModuleHelper; |
265 processorClassLoader = fileManager.hasLocation(ANNOTATION_PROCESSOR_PATH) |
264 processorClassLoader = fileManager.hasLocation(ANNOTATION_PROCESSOR_PATH) |
266 ? fileManager.getClassLoader(ANNOTATION_PROCESSOR_PATH) |
265 ? fileManager.getClassLoader(ANNOTATION_PROCESSOR_PATH) |
267 : fileManager.getClassLoader(CLASS_PATH); |
266 : fileManager.getClassLoader(CLASS_PATH); |
268 |
267 |
269 if (options.isSet("accessInternalAPI")) |
268 if (options.isSet("accessInternalAPI")) |
270 ModuleHelper.addExports(Module.getModule(getClass()), Module.getUnnamedModule(processorClassLoader)); |
269 ModuleHelper.addExports(getClass().getModule(), processorClassLoader.getUnnamedModule()); |
271 |
270 |
272 if (processorClassLoader != null && processorClassLoader instanceof Closeable) { |
271 if (processorClassLoader != null && processorClassLoader instanceof Closeable) { |
273 compiler.closeables = compiler.closeables.prepend((Closeable) processorClassLoader); |
272 compiler.closeables = compiler.closeables.prepend((Closeable) processorClassLoader); |
274 } |
273 } |
275 } |
274 } |