Skip to content

ChinaAgent for enhance Class method by javassist lib at Runtime

License

Notifications You must be signed in to change notification settings

ChinaXing/CnAgent

Repository files navigation

CnAgent

ChinaAgent for enhance Class method by javassist lib at Runtime/StartUp

usage

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.

Author

ChinaXing (chen.yack at gmail.com)

About

ChinaAgent for enhance Class method by javassist lib at Runtime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published