<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi Michal,</p>
<p><br>
</p>
<p>The provides directive returns TypeElement as the service and a
list of TypeElements as the implementations, and I don't think we
can reasonably model non-existing types as TypeElements (normally
missing types are modeled as erroneous TypeMirrors, I believe).
So, having the non-existent implementation listed in the directive
is probably difficult. Currently, when there are no
implementations, the directive is skipped altogether - it might be
possible to change that, although I am not sure if that would be
helpful (as the non-existent type would not be in the directive
anyway).</p>
<p><br>
</p>
<p>Overall, I wonder how exactly is this meant to work. Using the
(javac-specific) AST, one could get the (qualified) name that
refers to the type that does not exist, but that may be a simple
name, and depend on an import, so the correct FQN must be
inferable somehow?<br>
</p>
<p><br>
</p>
<p>Thanks,<br>
</p>
<p>Jan</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 01. 12. 22 9:24, Michał Kłeczek
wrote:<br>
</div>
<blockquote type="cite" cite="mid:C70E4304-755D-47AE-9459-1492863D2ADD@kleczek.org">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">Hi,</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">
<br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">I am implementing
an annotation processor that (among other things) is supposed to
generate service provider classes that delegate calls to beans
from a Spring application context.</span><br style="caret-color:
rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular;
font-size: 13px;">
<br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">The idea is to
mark a module in module-info with an annotation and add
“provides Service with Implementation” where Implementation is
not existent (yet).</span><br style="caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size:
13px;">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">Unfortunately it
seems ModuleElement.getDirectives() does not return such a
provides directive.</span><br style="caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size:
13px;">
<br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">Is it a bug or I
am missing something?</span><br style="caret-color: rgb(0, 0,
0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size:
13px;">
<br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">Thanks,</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);
font-family: Menlo-Regular; font-size: 13px;">Michal</span>
</blockquote>
</body>
</html>