Another reflection bug; compatibility results

Godmar Back kaffe@rufus.w3.org
Wed, 14 Jun 2000 16:34:32 -0600 (MDT)



 Have you tried calling 1.2's Class.forName(,false,) and then
using getField().getValue() on a final static field?
Does doing this invoke <clinit>?

If not, we should be able to fix Kaffe accordingly; I bet 10:1
it will call <clinit>.

But, actually, I don't really understand what that should be
good for anyway.  The only reason that accessing a final/static
field is not an active use is so the compiler can inline these
constants.

> 
> I may have to resort to one of these bytecode-interpretation libraries
> eventually :(
> 

I very much recommend it and I recommend JavaClass in particular.
Extremely easy to use - all types are named exactly as in the VM spec.
You can pretty much code without looking at the API.

	- Godmar