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 8 of 8 Topic 760 of 816
Post > Topic >>

Re: Adding constructor by bytecode instrumentation

by "Cyril Shelest" <ns_cyril@[EMAIL PROTECTED] > Mar 29, 2007 at 10:23 PM

Hi,
I did the same you mentioned. In my product that written with pure C++ I 
developed a code that parses Java bytecode, decomposes it into a syntax 
tree. The syntax tree is modified to add new methods/constructors. And
then 
from this syntax tree I generate a new Java bytecode.  The products that 
include this algorithm are avalable at
http://www.simtel.net/product.php[id]94368[SiteID]simtel.net
and
http://www.simtel.net/product.php[id]93174[SiteID]simtel.net



"Moritz Hammer" <newsgroup001@[EMAIL PROTECTED]
> wrote in message 
news:etod6b$7f1$1@[EMAIL PROTECTED]
> Hello,
>
> I am trying to use JVMTI to instrument the bytecode of all cl***** 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 cl*****, 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 Fri Jul 25 17:41:30 CDT 2008.