• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Generics - capture of ...

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone !

Consider this:

I know that it doesn't work and it shouldn't work.
What I am interested in is the mechanisms used by compiler
to resolve this problem. When you compile it, I assume that
? super Integer is changed to some kind of a class. If it
does, how is it then compared to other Objects ? The bottom line:
If ? super Integer is translated into some kind of object
which is then called by the compiler capture of ? super Integer,
how this object can be compared to lets say Object ?

Or maybe I am wrong and that's not the way compiler works here ?
If not, what is the purpose of "capture of" mechanism and
how is it used ?


Thanks,

Adrian
 
First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic