[weld-dev] Proxies.TypeInfo.getSuperInterface() question

Laird Nelson ljnelson at gmail.com
Fri Mar 6 12:30:43 EST 2020


On Fri, Mar 6, 2020 at 4:24 AM Matej Novotny <manovotn at redhat.com> wrote:

> You want your proxies to be based on the most concrete type of the bean
> for apparent reasons - you want the proxy to match all possible injection
> points, so it has to fit into all types, which is exactly what the most
> specific type will do.
>

Right.


> So in your 2 interface scenario with Square and Rectangle, you will always
> want to base proxy on Square so that the proxy has both types; therefore
> these methods will return you `Square` - a super interface for the proxy
> you are doing.
>

And not just any "super interface" but the most *specific* "super
interface".

OK.  So it's the name, then.  It probably should have been something like
getMostSpecificSuperInterface() or something awful like that.  :-)  I get
it now.  Nice to know I wasn't reading the code backwards!

Best,
Laird
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20200306/5633d58a/attachment.html 


More information about the weld-dev mailing list