<div dir="ltr"><div dir="ltr">On Wed, Feb 15, 2023 at 5:07 PM Alex Buckley <<a href="mailto:alex.buckley@oracle.com">alex.buckley@oracle.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Via ExecutableElement::getParameters, the VariableElement which <br>
represents the declaration of formal parameter `s` should expose a <br>
TypeMirror for the type `@A String`.<br></blockquote><div><br></div><div>Thank you. That is exactly what I expected. It does not. Should I file a bug?</div><div><br></div><div>Test code excerpted below:</div><div><br></div><div>Element e = elements.getTypeElement("B");</div><div>ExecutableElement c = (ExecutableElement)e.getEnclosedElements().get(1); // 0 is the implicit constructor; 1 is the c method<br>assert "c".equals(c.getSimpleName().toString()); // yep, got the right method</div><div>VariableElement s = (VariableElement)c.getParameters().get(0);<br>assert "s".equals(s.getSimpleName().toString()); // yep, got the right parameter</div><div>DeclaredType sAsType = (DeclaredType)s.asType();</div><div>assert !sAsType.getAnnotations().isEmpty(); // fails; it is empty</div><div><br></div><div>Thanks,</div><div>Laird</div></div></div>