#ModuleAnnotations
Paul Benedict
pbenedict at apache.org
Thu Jun 30 15:42:01 UTC 2016
Dear EG Members,
I would like to formally submit this suggestion for your consideration [1].
The link is what I sent to the "observers" list, but EG members are not
required to read that. Hence the message here.
First, if annotations are going to be placed on individual directives,
please open a new RFE so that javax.lang.model reflects those new elements.
Second, I do not believe annotations should be placed on individual
directives. Here's why: as the module descriptor currently stands, the
syntax is more about operations than a declaration. It makes no more sense
to annotate a "requires" statement than it does an "import" statement.
These are not declarations; they direct something to be done. For the same
reason, you also cannot annotate "for", "if", and "while" statements. All
those things do something. None of them declare something. I hope you
recognize what I am objecting to, because it's about to introduce an
incongruity into the Java language.
In the event the EG really, really, really wants to annotate individual
directives, I believe you first need to solve the incongruity -- by
changing the module source syntax. I don't have a proposal for you here,
but I am raising the obvious language problem you're about to introduce.
[1]
http://mail.openjdk.java.net/pipermail/jpms-spec-observers/2016-June/000415.html
Cheers,
Paul
More information about the jpms-spec-comments
mailing list