From: Leo U. <leo...@ya...> - 2006-12-07 20:31:49
|
Oh yeah, I was able to get the Dynamic proxy method invocation working, so it is a path that may prove to work. Im a little worried about adding another reflective level of indirection and Im not sure what impact this would have on object construction time. The dynamic subclassing appears to be going ok. I can generate a subclass and load the bytes but there is some verification error going on when I try to reflectively look at the constructor. It keeps complaining that Im calling the wrong initialization method, which is odd since Im invoking the <init> of the superclass. There must be a crucial step being missed in building up the constructor's byte code. leouser --- Leo User <leo...@ya...> wrote: > Ok, since the first email entered the ether > apparently, Ill try to rewrite it: > > Ive been looking at integrating new style > classes(primarily object at this point) and Java > interfaces. At this juncture I have integration to > the point where you can do things like: > class(object, Runnable): > def run(self): > print "RUNNING" > > and you can invoke run and pass the Runnable to Java > methods. There are 2 primary changes: > 1. Alter PyType so that it will allow interfaces to > be > mingled with new style classes. > 2. Alter PyObjectDerived so when asked via > __tojava__ > if it is a Runnable(for example) it will return a > dynamic proxy that will allow the code to interact > with the object as if it is a Runnable. > > I haven't taken it to the point where the dynamic > invoker actually calls the class instance, but I am > going to assume that it is doable. > > Im going to ponder other ways of doing this, though > it > works it'd be great if the thing just was a Runnable > and not have to play tricks with it. > > thoughts folks? > leouser > > > > ____________________________________________________________________________________ > Do you Yahoo!? > Everyone is raving about the all-new Yahoo! Mail > beta. > http://new.mail.yahoo.com > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev > ____________________________________________________________________________________ Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited |