Is there a way to obtain the bytecode for a class at runtime?

后端 未结 2 1211
余生分开走
余生分开走 2020-12-06 01:03

In Java, is there a way (at runtime) to obtain the bytecode which defined a particular class?

Put another way, is there a way to obtain the byte[] array

相关标签:
2条回答
  • 2020-12-06 01:47

    "Java agents" would be the obvious solution.

    0 讨论(0)
  • 2020-12-06 01:53

    Here is a description how to implement an agent

    0 讨论(0)
提交回复
热议问题