537 return true;
538 }
539 }
540
541 private void buildArchives() throws IOException {
542 for (String s : classes) {
543 Path p = Paths.get(s);
544 if (Files.exists(p)) {
545 initialArchives.add(Archive.getInstance(p));
546 }
547 }
548 sourceLocations.addAll(initialArchives);
549
550 classpaths.addAll(getClassPathArchives(options.classpath));
551 if (options.includePattern != null) {
552 initialArchives.addAll(classpaths);
553 }
554 classpaths.addAll(PlatformClassPath.getModules(options.mpath));
555 if (options.mpath != null) {
556 initialArchives.addAll(PlatformClassPath.getModules(options.mpath));
557 }
558 classpaths.addAll(PlatformClassPath.getJarFiles());
559 // add all classpath archives to the source locations for reporting
560 sourceLocations.addAll(classpaths);
561 }
562
563 private void findDependencies(boolean apiOnly) throws IOException {
564 Dependency.Finder finder =
565 apiOnly ? Dependencies.getAPIFinder(AccessFlags.ACC_PROTECTED)
566 : Dependencies.getClassDependencyFinder();
567 Dependency.Filter filter = new DependencyFilter();
568
569 Deque<String> roots = new LinkedList<>();
570 for (String s : classes) {
571 Path p = Paths.get(s);
572 if (!Files.exists(p)) {
573 if (isValidClassName(s)) {
574 roots.add(s);
575 } else {
576 warning("warn.invalid.arg", s);
577 }
578 }
|
537 return true;
538 }
539 }
540
541 private void buildArchives() throws IOException {
542 for (String s : classes) {
543 Path p = Paths.get(s);
544 if (Files.exists(p)) {
545 initialArchives.add(Archive.getInstance(p));
546 }
547 }
548 sourceLocations.addAll(initialArchives);
549
550 classpaths.addAll(getClassPathArchives(options.classpath));
551 if (options.includePattern != null) {
552 initialArchives.addAll(classpaths);
553 }
554 classpaths.addAll(PlatformClassPath.getModules(options.mpath));
555 if (options.mpath != null) {
556 initialArchives.addAll(PlatformClassPath.getModules(options.mpath));
557 } else {
558 classpaths.addAll(PlatformClassPath.getJarFiles());
559 }
560 // add all classpath archives to the source locations for reporting
561 sourceLocations.addAll(classpaths);
562 }
563
564 private void findDependencies(boolean apiOnly) throws IOException {
565 Dependency.Finder finder =
566 apiOnly ? Dependencies.getAPIFinder(AccessFlags.ACC_PROTECTED)
567 : Dependencies.getClassDependencyFinder();
568 Dependency.Filter filter = new DependencyFilter();
569
570 Deque<String> roots = new LinkedList<>();
571 for (String s : classes) {
572 Path p = Paths.get(s);
573 if (!Files.exists(p)) {
574 if (isValidClassName(s)) {
575 roots.add(s);
576 } else {
577 warning("warn.invalid.arg", s);
578 }
579 }
|