Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Machine > Re: Adding cons...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 8 Topic 760 of 816
Post > Topic >>

Re: Adding constructor by bytecode instrumentation

by "Chris Uppal" <chris.uppal@[EMAIL PROTECTED] > Mar 27, 2007 at 06:30 AM

Moritz Hammer wrote:

> Maybe a cleaner solution than using an "unlikely"
> signature - I used "DIFFZIFF" ;-) If not.defined.Anywhere is not put
into
> the bootstrap classpath, the instrumented ClassLoader subclass gets
> screwed, since it requires a loaded instance of not.defined.Anywhere to
> get started, and this leads to very strange errors.

I'm probably misunderstanding you, but I don't see why you'd have to load
class
not.defined.Anywhere at all -- there's no need to create an instance just
to
call a method with that signature.  I was able to call my additional
Object
constuctor with bytecode:

    new java/lang/Object
    aconst_null
    invokespecial java/lang/Object/<init> ([Lnot/defined/Anywhere;)V

Which worked, in that my constuctor was called, but of course I had
nothing
comparable to your custom classloader in my test settup.


    -- chris
 




 8 Posts in Topic:
Adding constructor by bytecode instrumentation
Moritz Hammer <newsgro  2007-03-20 10:31:39 
Re: Adding constructor by bytecode instrumentation
"Chris Uppal" &  2007-03-20 22:59:01 
Re: Adding constructor by bytecode instrumentation
Moritz Hammer <newsgro  2007-03-23 10:18:44 
Re: Adding constructor by bytecode instrumentation
"Chris Uppal" &  2007-03-26 11:36:05 
Re: Adding constructor by bytecode instrumentation
Moritz Hammer <newsgro  2007-03-26 12:24:53 
Re: Adding constructor by bytecode instrumentation
"Chris Uppal" &  2007-03-27 06:30:04 
Re: Adding constructor by bytecode instrumentation
Moritz Hammer <newsgro  2007-03-27 08:58:39 
Re: Adding constructor by bytecode instrumentation
"Cyril Shelest"  2007-03-29 22:23:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 4:55:45 CDT 2008.