Talk About Network



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 > Adding construc...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 760 of 803
Post > Topic >>

Adding constructor by bytecode instrumentation

by Moritz Hammer <newsgroup001@[EMAIL PROTECTED] > Mar 20, 2007 at 10:31 AM

Hello,

I am trying to use JVMTI to instrument the bytecode of all classes up to
java.lang.Object. I need this so I can have a plain constructor (with some
special signature) that does not do anything besides calling a superclass
constructor that also does nothing (I want to simulate the effect of
the actual constructor later). Right now, that does not sound too
complicated to me: add another <init> method in the constant pool and a
method block later. However, before I start, I wanted to ask people who
know whether it can really be done: adding another constructor to
java.lang.Object (or, at least, any direct subclass). Any pitfalls I am
currently heading to? Is there any framework I can use (I do not want
to permanently instrument all Java classes, so unless I am mistaken, I
need to do it with JVMTI and implement it in C to get a grasp on
java.lang.Object). 

Any hints are greatly appreciated,
  Moritz




 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 Thu May 15 1:09:19 CDT 2008.