From: Peter C. M. <pcm...@em...> - 2005-05-05 02:09:01
|
sorry for not responding earlier, but I thought I implement the thing first :) Well, it's not completely implemented (the exceptions are still missing), but the real challenge was somewhere else - reflective functions (incl object creation) have to be done from a native method (a NativePeer - see MJI docu) so that we can get to the JPF innards (type info, heap allocation etc.). The problem is that this includes some round trip where we start in JPF executed code, from there call a native method that is executed in the host VM, from there execute some bytecode back in JPF (in the case of Class.newInstance(), this is the default ctor). It's a tricky problem, and there are still some serious caveats (you are not allowed to block from the JPF executed code you call back into), but the important infrastructure is in place. As to your question - Class.newInstance() should work now (less exceptions), but that's pretty much the frontier for reflection for now. -- Peter On May 3, 2005, at 2:39 PM, Atwood, John Wesley wrote: > JPF users, > > Trying to learn about JPF, I ran the jpf run-tests, and a few of the > examples. > Then I ran it on my own program, and get: > Class.newInstance() not yet supported > > Is all dynamic object creation prohibited, and, if so, is that a > fundamental aspect of JPF? > > Thanks, > > John Atwood |