Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Runtime type information Generic Classes

Reply
Thread Tools

Runtime type information Generic Classes

 
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      03-14-2007
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

 
Reply With Quote
 
 
 
 
Chris Dollin
Guest
Posts: n/a
 
      03-14-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> 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?

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

 
Reply With Quote
 
 
 
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      03-15-2007

> Is that important to you?



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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
not just generic type programming,but also parallism generic syntaxprogramming?? minlearn C++ 2 03-13-2009 05:17 PM
signer information does not match signer information of other classes in the same pac lerenard001 Java 0 07-09-2008 04:28 PM
signer information does not match signer information of other classes in the same pac lerenard001 Java 0 07-07-2008 03:46 PM
Generic container where type is known only at runtime Terence Wilson C++ 4 05-11-2007 09:11 PM
signer information does not match signer information of other classes in the same package clercmedia Java 2 12-09-2005 03:14 PM



Advertisments