The typing information is available using IObjectDescriptor#getDesiredType().

http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/tree/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IObjectDescriptor.java

Brian.

On 8-Mar-2013, at 2:49 AM, Marcel Bruch wrote:

> 
> On Mar 8, 2013, at 8:05 AM, "Toedter, Kai" <[email protected]> wrote:
> 
>> Marcel wrote
>>> The information about generics is still in the bytecode.
>> I thought the "Type Erasure" implementation of generics erases everything 
>> related to generics at compile time.
>> What information is available at runtime?
> 
> See [1] for a brief example. It's in the attributes of a field/method and can 
> be found in the constant pool. I'm not very familiar with the details but the 
> (a lot) information can be reconstructed from bytecode otherwise Guice 
> couldn't inject my generic fields. For details, the JVM spec is the reference 
> to look at I guess :-)
> 
> Best,
> Marcel
> 
> [1] 
> http://stackoverflow.com/questions/937933/where-are-generic-types-stored-in-java-class-files
> 
>> 
>> Best regards,
>> 
>> Kai
>> 
>>> -----Original Message-----
>>> From: [email protected] [mailto:[email protected]]
>>> On Behalf Of Marcel Bruch
>>> Sent: Freitag, 8. März 2013 07:57
>>> To: E4 Project developer mailing list
>>> Subject: Re: [e4-dev] E4 Formal API Part 2: UI Model
>>> 
>>> 
>>> On Mar 8, 2013, at 7:30 AM, Lars Vogel <[email protected]> wrote:
>>> 
>>>>> Not with generics. Would be awesome to have.
>>>> 
>>>> That is a Java thing, generics are not available at runtime.
>>> 
>>> The information about generics is still in the bytecode. DI frameworks like
>>> guice and spring can handle generics (with some limitations) and eclipse
>>> could do so too. the question about generics pops up quite often during
>>> training or hands-ons.
>>> _______________________________________________
>>> e4-dev mailing list
>>> [email protected]
>>> https://dev.eclipse.org/mailman/listinfo/e4-dev
>> _______________________________________________
>> e4-dev mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/e4-dev
> 
> _______________________________________________
> e4-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/e4-dev

_______________________________________________
e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/e4-dev

Reply via email to