Loading an automatic module from an exploded directory
Eirik Bjørsnøs
eirbjo at gmail.com
Fri Apr 10 10:14:45 UTC 2020
On Thu, Apr 9, 2020 at 5:42 PM Eirik Bjørsnøs <eirbjo at 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.
More information about the jigsaw-dev
mailing list