Bytecode Instrumentation
| 2004 JavaOne
SM
Conference | Session 3042 Copyright Hewlett Packard Co., 2004.
20
Approaches for Method Instrumentation
•
Rename
─ Entry point renamed
•
Wrap
─ Original method’s name
─ Add instrumentation
─ Call original target method
•
Insert
─ Directly modify the method/class
•
Mixin
─ Add field, interface, method to class
─ Add prefix/suffix to method(s)