<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<br>
<blockquote type="cite" cite="mid:2039965590.38108304.1681744585219.JavaMail.zimbra@univ-eiffel.fr">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div data-marker="__QUOTED_TEXT__">
<div>Note that we discussed about introducing method
references in annotation for Java 8.<br data-mce-bogus="1">
</div>
<div>This is now a little simpler because, since 11, we have
constant dynamic and we can extend the annotation tag "c" to
work with any constants provided by a constant dynamic
instead of only "constant classes" (the same way the meaning
of the opcode ldc was extended to support constant dynamic).<br data-mce-bogus="1">
</div>
</div>
</div>
</blockquote>
<br>
This is definitely a convenience for implementation, though there
are also other considerations that might influence the design of the
attribute in other directions. In general, we are likely to remain
extremely conservative about putting "more stuff in annotations". <br>
<br>
<blockquote type="cite" cite="mid:2039965590.38108304.1681744585219.JavaMail.zimbra@univ-eiffel.fr">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div data-marker="__QUOTED_TEXT__">
<div><br data-mce-bogus="1">
</div>
<div>At least for ASM and the reflection, this change does not
change the API, only the implementation.<br data-mce-bogus="1">
</div>
</div>
</div>
</blockquote>
<br>
True for ASM because it uses Object and then uses instanceof chains
to make sure you've provided a good kind of Object, but not
necessarily true for all bytecode APIs, which might use sealed
types.<br>
<br>
<blockquote type="cite" cite="mid:2039965590.38108304.1681744585219.JavaMail.zimbra@univ-eiffel.fr">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div data-marker="__QUOTED_TEXT__">
<div>This is still a big change, javac and the VM needs to be
updated but this is less scary than before constant dynamic
was introduced.<br data-mce-bogus="1">
</div>
</div>
</div>
</blockquote>
<br>
Yes, not only an invasive implementation change, but there are also
some nontrivial design questions as well. (Annotations prove once
again to be "the gift that keeps on giving".) <br>
</body>
</html>