Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

Runtime type information Generic Classes

Thread view: 
marcwentink@hotmail.com - 14 Mar 2007 11:11 GMT
I am reading some information on generic (typed) collections and own
created generic classes in Java 5. I have understood that in the new
typed collections, the 'type' is only a compile time feature, it is
stripped from the collections like ArrayList in the intermediate code.
But if I generate my of generic typed class, is this information
stripped aswell, or is the first only something special for
collections to make them work with Java 4 'Object type' collections?

Marc Wentink
Chris Dollin - 14 Mar 2007 11:17 GMT
> I am reading some information on generic (typed) collections and own
> created generic classes in Java 5. I have understood that in the new
> typed collections, the 'type' is only a compile time feature, it is
> stripped from the collections like ArrayList in the intermediate code.

Yes: `type erasure`.

> But if I generate my of generic typed class, is this information
> stripped aswell,

Yes.

Is that important to you?

Signature

Chris "electric hedgehog" Dollin
Nit-picking is best done among friends.

marcwentink@hotmail.com - 15 Mar 2007 12:21 GMT
> Is that important to you?

No, not really important, I was just curious.
Thank you for the information.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.