New issue: #ModuleDescriptorAnnotationAPI

Paul Benedict pbenedict at apache.org
Tue Aug 2 18:23:44 UTC 2016


Dear EG Members,

Given that a module-info.class can now have annotations, I've run into this
issue:

Although annotations are written into module-info.class, they are
unavailable once the file gets represented by a ModuleDescriptor. For
example, there is no way to query a ModuleDescriptor to determine if it was
annotated with @Deprecated or any other annotated type. All that useful
information is apparently not exposed through any existing API.

Likewise, there seems to be no way to annotate using
ModuleDescriptor.Builder. For tools that wish to build and/or transform
them at runtime, I propose that annotation support is introduced on these
two types.

Cheers,
Paul


More information about the jpms-spec-comments mailing list