Bytecode Instrumentation
| 2004 JavaOne
SM
Conference | Session 3042 Copyright Hewlett Packard Co., 2004.
24
java_crw_demo
Example: Constant Pool Addition
•
fillin_cpool_entry
─ Write the information as a constant pool entry
•
add_new_cpool_entry
─ Call to fillin_cpool_entry
•
add_new_method_cpool_entry
─ Call to add UTF8 name to constant pool
─ Call to add UTF8 descr index to constant pool
─ Call to add name type to constant pool
─ Call to add method type to constant pool
•
cpool_setup (index 0 not in pool)
─ add_new_method_cpool_entry
•
inject_class
─ cpool_setup