String arguments in kaffe

Archie Cobbs kaffe@rufus.w3.org
Tue, 25 Aug 1998 11:28:15 -0700 (PDT)


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

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com