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


|