< prev index next >

test/tools/jdeps/lib/JdepsUtil.java

Print this page




 130         public Command requires(Set<String> mods) {
 131             requires.addAll(mods);
 132             return this;
 133         }
 134 
 135         public Command matchPackages(Set<String> pkgs) {
 136             filter.packages(pkgs);
 137             return this;
 138         }
 139 
 140         public Command regex(String regex) {
 141             filter.regex(Pattern.compile(regex));
 142             return this;
 143         }
 144 
 145         public Command include(String regex) {
 146             filter.includePattern(Pattern.compile(regex));
 147             return this;
 148         }
 149 
 150         public Command includeSystemMoudles(String regex) {
 151             filter.includeSystemModules(Pattern.compile(regex));
 152             return this;
 153         }
 154 
 155         public Command apiOnly() {
 156             this.apiOnly = true;
 157             return this;
 158         }
 159 
 160         public JdepsConfiguration configuration() throws IOException {
 161             if (configuration == null) {
 162                 this.configuration = builder.build();
 163                 requires.forEach(name -> {
 164                     ModuleDescriptor md = configuration.findModuleDescriptor(name).get();
 165                     filter.requires(name, md.packages());
 166                 });
 167             }
 168             return configuration;
 169         }
 170 
 171         private JdepsWriter writer() {
 172             return JdepsWriter.newSimpleWriter(pw, verbose);
 173         }
 174 




 130         public Command requires(Set<String> mods) {
 131             requires.addAll(mods);
 132             return this;
 133         }
 134 
 135         public Command matchPackages(Set<String> pkgs) {
 136             filter.packages(pkgs);
 137             return this;
 138         }
 139 
 140         public Command regex(String regex) {
 141             filter.regex(Pattern.compile(regex));
 142             return this;
 143         }
 144 
 145         public Command include(String regex) {
 146             filter.includePattern(Pattern.compile(regex));
 147             return this;
 148         }
 149 





 150         public Command apiOnly() {
 151             this.apiOnly = true;
 152             return this;
 153         }
 154 
 155         public JdepsConfiguration configuration() throws IOException {
 156             if (configuration == null) {
 157                 this.configuration = builder.build();
 158                 requires.forEach(name -> {
 159                     ModuleDescriptor md = configuration.findModuleDescriptor(name).get();
 160                     filter.requires(name, md.packages());
 161                 });
 162             }
 163             return configuration;
 164         }
 165 
 166         private JdepsWriter writer() {
 167             return JdepsWriter.newSimpleWriter(pw, verbose);
 168         }
 169 


< prev index next >