The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

reply

Posted by stunning on November 14, 2001 at 7:58 PM

> How are you getting a reference to an object of that class upon which to call the method, anyway? You didn't say it was a static method...
I am not clearly what u meant.the method(including constructor method) i want to invoke used the same trick.first adding public then remove and u can change the content of the method.it runs quite well.
i just use the delaybinding mechanism.i don't think it will cause some problems(at least i want to know it very much coz i can't work it out),this is jvm design pattern fault or bug...i don't know.
and as u said"Make the class public. (you ruled this out, for some unknown reason)."this is the best method,i am curious about the unknown reason.
of course it will make the other guys confused about the code,an interesting thing.






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us