String arguments in kaffe
archie at whistle.com
Tue Aug 25 11:28:15 PDT 1998
Harish Sankaran writes:
> Before a method is actually executed ,I want to trap the string
> arguments(if any) in the method in the JVM.
> For eg. if there is a method in the class
> g.drawstring("Welcome",10,20) I want to trap the string "Welcome" before
> the method is actually executed.I tried printing the arguments in the
If you're really clever, you'd do this completely in Java by
subclassing ClassLoader and overriding loadClass() to instrument
each class file with new bytecodes at the beginning of each method
to print out any String arguments.
But that's probably damn near impossible.. :-)
Brings up a good question.. has anyone defined a "Bytecode" class
that would let you more easily do things like this?
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
More information about the kaffe