181 if (configuration == null) {
182 this.configuration = builder.build();
183 requires.forEach(name -> {
184 ModuleDescriptor md = configuration.findModuleDescriptor(name).get();
185 filter.requires(name, md.packages());
186 });
187 }
188 return configuration;
189 }
190
191 private JdepsWriter writer() {
192 return JdepsWriter.newSimpleWriter(pw, verbose);
193 }
194
195 public DepsAnalyzer getDepsAnalyzer() throws IOException {
196 return new DepsAnalyzer(configuration(), filter.build(), writer(),
197 verbose, apiOnly);
198 }
199
200 public ModuleAnalyzer getModuleAnalyzer(Set<String> mods) throws IOException {
201 // if -check is set, add to the root set and all modules are observable
202 addmods(mods);
203 builder.allModules();
204 return new ModuleAnalyzer(configuration(), pw, mods);
205 }
206
207 public InverseDepsAnalyzer getInverseDepsAnalyzer() throws IOException {
208 return new InverseDepsAnalyzer(configuration(), filter.build(), writer(),
209 verbose, false);
210 }
211
212 public void dumpOutput(PrintStream out) {
213 out.println(sw.toString());
214 }
215
216 @Override
217 public void close() throws IOException {
218 configuration.close();
219 }
220 }
221
|
181 if (configuration == null) {
182 this.configuration = builder.build();
183 requires.forEach(name -> {
184 ModuleDescriptor md = configuration.findModuleDescriptor(name).get();
185 filter.requires(name, md.packages());
186 });
187 }
188 return configuration;
189 }
190
191 private JdepsWriter writer() {
192 return JdepsWriter.newSimpleWriter(pw, verbose);
193 }
194
195 public DepsAnalyzer getDepsAnalyzer() throws IOException {
196 return new DepsAnalyzer(configuration(), filter.build(), writer(),
197 verbose, apiOnly);
198 }
199
200 public ModuleAnalyzer getModuleAnalyzer(Set<String> mods) throws IOException {
201 // if --check is set, add to the root set and all modules are observable
202 addmods(mods);
203 builder.allModules();
204 return new ModuleAnalyzer(configuration(), pw, mods);
205 }
206
207 public InverseDepsAnalyzer getInverseDepsAnalyzer() throws IOException {
208 return new InverseDepsAnalyzer(configuration(), filter.build(), writer(),
209 verbose, false);
210 }
211
212 public void dumpOutput(PrintStream out) {
213 out.println(sw.toString());
214 }
215
216 @Override
217 public void close() throws IOException {
218 configuration.close();
219 }
220 }
221
|