Creating a method with generic type parameters

93 views
Skip to first unread message

William Burke

unread,
Nov 18, 2022, 11:21:22 AM11/18/22
to Quarkus Development mailing list
With Gizmo, is it possible to generate a method that has generic type signatures?  Example somewhere?  Searching...

Thanks,

Bill

--
Bill Burke
Red Hat

Georgios Andrianakis

unread,
Nov 18, 2022, 11:29:54 AM11/18/22
to William Burke, Quarkus Development mailing list
It is, you need to set signature manually (gizmo has method for that)

I'm on a phone now, but I do remember spring data and resteasy reactive extensions doing that.

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAL%3DE%3DjQGLqJkmBBvtgMOduwTfPsOYDMc%2BkR-HK7NmEtKgJ%2BKfw%40mail.gmail.com.

William Burke

unread,
Nov 18, 2022, 11:37:34 AM11/18/22
to Georgios Andrianakis, Quarkus Development mailing list
I see examples of creating MethodDescriptor based on strings pulled from Jandex classes (Type, MethodInfo, ClassInfo, etc...), but I don't have access to a Jandex object, only reflection, and can't grok the syntax so far.

Guillaume Smet

unread,
Nov 18, 2022, 11:41:37 AM11/18/22
to bbu...@redhat.com, Georgios Andrianakis, Quarkus Development mailing list
On Fri, Nov 18, 2022 at 5:37 PM William Burke <bbu...@redhat.com> wrote:
I see examples of creating MethodDescriptor based on strings pulled from Jandex classes (Type, MethodInfo, ClassInfo, etc...), but I don't have access to a Jandex object, only reflection, and can't grok the syntax so far.

The method here should give you all the information you need:

Calling MethodCreator#setSignature() is the way to go and the syntax is described in the Javadoc.
Reply all
Reply to author
Forward
0 new messages