Querying module and module file contents
Alan Bateman
Alan.Bateman at oracle.com
Wed May 9 02:37:15 PDT 2012
On 09/05/2012 06:15, David Holmes wrote:
> Given an installed module, or a jmod module file, how can I query:
>
> a) what types are exported by the module [file]
> b) what types are contained in the module [file]
>
> I want to validate that my module is getting everything packaged up
> correctly.
>
> Also am I right in thinking that the set of types in a module is not
> declared in the module-info, but simply controlled by the -i option to
> jpkg? (The module-info only declares exported types, not contained types)
If the module is installed then do you can use "jmod ls -v <midq>" and
print out the module declaration, including the exports. It may not be
exactly what you want as it doesn't print the complete list of contents
and so doesn't print out the types that aren't exported, resources,
native libraries, commands, etc. I can see how that could be useful and
maybe something we should consider, perhaps with a different option. I
could imagine an option to verify too, especially with modules that have
files, commands for example, that aren't in the module library.
As regards jpkg then it's the -m, --natlib, --config etc. commands that
specify the actual content. In the case of classes then it will likely
be more than the types exported by module. I think you're also asking if
there is a way to examine the contents of a jmod module. I can see how
this could be useful and maybe we could add something equivalent to
dpkg-deb -show and -c.
-Alan.
More information about the jigsaw-dev
mailing list