Bytecode Instrumentation

| 2004 JavaOne
SM
Conference | Session 3042 Copyright Hewlett Packard Co., 2004.
28
Using java_crw_demo(): 19 Parameters
1.
Caller assigned class number for class
2.
Internal class name
Example: java/lang/Object (use “/” separator)
3.
Pointer to class file image for the class
4.
Length of the class file in bytes
5.
Set to 1 if this is a system class
Prevents injections into empty <clinit>, finalize, and <init> methods
6.
Class that has methods to call at the injection sites (tclass)
7.
Signature of tclass
Format: "L" + tclass_name + ";"
8.
Method name in tclass to call at offset 0 for every method
9.
Signature of this method
Format: "(II)V"