497 return this;
498 }
499
500 public Builder addmods(Set<String> addmods) {
501 for (String mn : addmods) {
502 switch (mn) {
503 case ALL_MODULE_PATH:
504 this.addAllApplicationModules = true;
505 break;
506 case ALL_DEFAULT:
507 this.addAllDefaultModules = true;
508 break;
509 default:
510 this.rootModules.add(mn);
511 }
512 }
513 return this;
514 }
515
516 /*
517 * This method is for -check option to find all target modules specified
518 * in qualified exports.
519 *
520 * Include all system modules and modules found on modulepath
521 */
522 public Builder allModules() {
523 systemModulePath.moduleNames()
524 .forEach(this.rootModules::add);
525 this.addAllApplicationModules = true;
526 return this;
527 }
528
529 public Builder addRoot(Path path) {
530 Archive archive = Archive.getInstance(path);
531 if (archive.contains(MODULE_INFO)) {
532 paths.add(path);
533 } else {
534 initialArchives.add(archive);
535 }
536 return this;
537 }
|
497 return this;
498 }
499
500 public Builder addmods(Set<String> addmods) {
501 for (String mn : addmods) {
502 switch (mn) {
503 case ALL_MODULE_PATH:
504 this.addAllApplicationModules = true;
505 break;
506 case ALL_DEFAULT:
507 this.addAllDefaultModules = true;
508 break;
509 default:
510 this.rootModules.add(mn);
511 }
512 }
513 return this;
514 }
515
516 /*
517 * This method is for --check option to find all target modules specified
518 * in qualified exports.
519 *
520 * Include all system modules and modules found on modulepath
521 */
522 public Builder allModules() {
523 systemModulePath.moduleNames()
524 .forEach(this.rootModules::add);
525 this.addAllApplicationModules = true;
526 return this;
527 }
528
529 public Builder addRoot(Path path) {
530 Archive archive = Archive.getInstance(path);
531 if (archive.contains(MODULE_INFO)) {
532 paths.add(path);
533 } else {
534 initialArchives.add(archive);
535 }
536 return this;
537 }
|