< prev index next >
langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
Print this page
@@ -79,11 +79,11 @@
* print void java.lang.Runtime.runFinalizersOnExit(boolean)
* - more example output in man page
* - more rigorous GNU style option parsing; use joptsimple?
*
* FUTURES:
- * - add module support: -addmods, -modulepath, module arg
+ * - add module support: --add-modules, --module-path, module arg
* - load deprecation declarations from a designated class library instead
* of the JDK
* - load deprecation declarations from a module
* - scan a module (but a modular jar can be treated just a like an ordinary jar)
* - multi-version jar
@@ -329,11 +329,11 @@
*
* @return true for success, false for failure
* @throws IOException if an I/O error occurs
*/
boolean processSelf(Collection<String> classes) throws IOException {
- options.add("-addmods");
+ options.add("--add-modules");
options.add("java.se.ee,jdk.xml.bind"); // TODO why jdk.xml.bind?
if (classes.isEmpty()) {
Path modules = FileSystems.getFileSystem(URI.create("jrt:/"))
.getPath("/modules");
@@ -358,28 +358,28 @@
* @param release "6", "7", "8", or "9"
* @param classes collection of classes to process, may be empty
* @return success value
*/
boolean processRelease(String release, Collection<String> classes) throws IOException {
- options.addAll(List.of("-release", release));
+ options.addAll(List.of("--release", release));
if (release.equals("9")) {
List<String> rootMods = List.of("java.se", "java.se.ee");
TraverseProc proc = new TraverseProc(rootMods);
JavaCompiler.CompilationTask task =
compiler.getTask(null, fm, this,
// options
- List.of("-addmods", String.join(",", rootMods)),
+ List.of("--add-modules", String.join(",", rootMods)),
// classes
List.of("java.lang.Object"),
null);
task.setProcessors(List.of(proc));
if (!task.call()) {
return false;
}
Map<PackageElement, List<TypeElement>> types = proc.getPublicTypes();
- options.add("-addmods");
+ options.add("--add-modules");
options.add(String.join(",", rootMods));
return doClassNames(
types.values().stream()
.flatMap(List::stream)
.map(TypeElement::toString)
< prev index next >