<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Using a public, but not exported annotation is what I'm
suggesting.</p>
<p>But note that external tools won't be able to retrieve this
annotation reflectively (e.g. using Method::getAnnotation),
because the annotation is not really "public".</p>
<p>As for IDEs and external tools, it would be similar to how they
handle preview features/API today (note also that, at the level of
classfile processing - e.g. using the classfile API - obviously
you can see that an annotation is there).<br>
</p>
<p>Maurizio<br>
</p>
<div class="moz-cite-prefix">On 24/08/2023 14:14, Volker Simonis
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CA+3eh123_e6oEahmyb1g0E1hieAJqVGfTphpOKUPvFPZ4Q12Ww@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">I'm not a module expert but can't we create a public, documented
annotation in a package which is only exported to the core JDK modules
with the help of a qualified export?
</pre>
<blockquote type="cite" style="color: #8c8c8c;">
<pre class="moz-quote-pre" wrap="">That said, an internal annotation like `@PreviewFeature` could be enough
to provide javac support along the lines you describe.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">Yes, that would be enough for javac but not for IDEs and external tools.
</pre>
</blockquote>
</body>
</html>