On Thu, Apr 9, 2020 at 5:42 PM Eirik Bjørsnøs <eir...@gmail.com> wrote:
Here's a strawman API which I think would support my use case : > > ModuleFinder auto = ModuleFinder.automatic(Path location, String > defaultName, Set<String> packages, Set<String> serviceNames) > Another thought... Since ModuleReader already has the list() method, code in java.lang.module could use that to scan for packages and service names it needs to derive automatic ModuleDescriptors. Clients would now only need to pass the custom module reader and a default automatic name: ModuleFinder moduleFinder = ModuleFinder.of(ModuleReader moduleReader, String defaultAutomaticModuleName); I would still have to create my custom module reader, but I would no longer need to know or care about the details of how automatic modules work. Something to consider? Cheers, Eirik.