ChinaAgent for enhance Class method by javassist lib at Runtime/StartUp
Use Jvm attach Api or -javaagent to load this agent, and pass the arguments like following:
argentargs = 'com.yet.another.test.plain.ClassB::producer|data$=$"world";$System.out.println(data);'
where
- class is : com.yet.another.test.plain.ClassB
- method is : producer
- use $ as placeholder of white blank char
This will insert the code "data = "world";
into the front of the method producer
of classcom.yet.another.test.plain.ClassB
You can use CnAttacher to load this agent.
ChinaXing (chen.yack at gmail.com)