Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] E4 Formal API Part 2: UI Model


On Mar 8, 2013, at 8:05 AM, "Toedter, Kai" <kai.toedter@xxxxxxxxxxx> 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



Best regards,

Kai

-----Original Message-----
From: e4-dev-bounces@xxxxxxxxxxx [mailto:e4-dev-bounces@xxxxxxxxxxx]
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 <lars.vogel@xxxxxxxxx> 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
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev


Back to the top