Question with wildcard types
José Cornado
jose.cornado at gmail.com
Wed Nov 13 09:03:46 PST 2013
wouldn't be more appropriate to return Class C?
On Wed, Nov 13, 2013 at 9:58 AM, José Cornado <jose.cornado at gmail.com>wrote:
> Hello!
>
> I have a short question regarding wildcard types:
>
> public class C<X extends anInterface>{
>
> anotherInterface<? super C<X>> p;
> }
>
> I compile say C<implementorOfanInterface> and I do a getLowerBounds() on
> p's type I get TypeVariable X instead of
> ParameterizedType C<implementorOfanInterface>.
>
> Is this expected?
>
> JVM info:
>
> java version "1.7.0_25"
> Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
>
> on mac os X.
>
> Thanks a lot!!
>
> --
> José Cornado
>
> --
>
> home: http://www.efekctive.com
> blog: http://blogging.efekctive.com
> ----------------------
>
> Everything has been said before, but since nobody listens we have to keep
> going back and beginning all over again.
>
> Andre Gide
>
--
José Cornado
--
home: http://www.efekctive.com
blog: http://blogging.efekctive.com
----------------------
Everything has been said before, but since nobody listens we have to keep
going back and beginning all over again.
Andre Gide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20131113/36a26ef6/attachment-0001.html
More information about the compiler-dev
mailing list