290 .findModule(root).get()
291 .reads().stream()
292 .map(ResolvedModule::name))
293 .collect(toSet());
294 } else {
295 // approximation
296 return system.findAll().stream()
297 .map(ModuleReference::descriptor)
298 .map(ModuleDescriptor::name)
299 .filter(name -> name.startsWith("java.") &&
300 !name.equals("java.smartcardio"))
301 .collect(Collectors.toSet());
302 }
303 }
304
305 private static Set<String> jdk() {
306 return ModuleFinder.ofSystem().findAll().stream()
307 .map(ModuleReference::descriptor)
308 .map(ModuleDescriptor::name)
309 .filter(name -> !JAVA_SE_SUBGRAPH.contains(name) &&
310 (name.startsWith("java.") ||
311 name.startsWith("jdk.") ||
312 name.startsWith("javafx.")))
313 .collect(Collectors.toSet());
314 }
315
316 static class SubGraph {
317 final String name;
318 final String group;
319 final String color;
320 final Set<String> nodes;
321 SubGraph(String name, String group, String color, Set<String> nodes) {
322 this.name = Objects.requireNonNull(name);
323 this.group = Objects.requireNonNull(group);
324 this.color = Objects.requireNonNull(color);
325 this.nodes = Objects.requireNonNull(nodes);
326 }
327 }
328
329 private final String name;
330 private final Graph<String> graph;
331 private final Set<ModuleDescriptor> descriptors = new TreeSet<>();
332 private final List<SubGraph> subgraphs = new ArrayList<>();
|
290 .findModule(root).get()
291 .reads().stream()
292 .map(ResolvedModule::name))
293 .collect(toSet());
294 } else {
295 // approximation
296 return system.findAll().stream()
297 .map(ModuleReference::descriptor)
298 .map(ModuleDescriptor::name)
299 .filter(name -> name.startsWith("java.") &&
300 !name.equals("java.smartcardio"))
301 .collect(Collectors.toSet());
302 }
303 }
304
305 private static Set<String> jdk() {
306 return ModuleFinder.ofSystem().findAll().stream()
307 .map(ModuleReference::descriptor)
308 .map(ModuleDescriptor::name)
309 .filter(name -> !JAVA_SE_SUBGRAPH.contains(name) &&
310 (name.startsWith("java.") || name.startsWith("jdk.")))
311 .collect(Collectors.toSet());
312 }
313
314 static class SubGraph {
315 final String name;
316 final String group;
317 final String color;
318 final Set<String> nodes;
319 SubGraph(String name, String group, String color, Set<String> nodes) {
320 this.name = Objects.requireNonNull(name);
321 this.group = Objects.requireNonNull(group);
322 this.color = Objects.requireNonNull(color);
323 this.nodes = Objects.requireNonNull(nodes);
324 }
325 }
326
327 private final String name;
328 private final Graph<String> graph;
329 private final Set<ModuleDescriptor> descriptors = new TreeSet<>();
330 private final List<SubGraph> subgraphs = new ArrayList<>();
|