实时java.lang.instrument.ClassFileTransformer的目的是什么。这仅在分析过程中使用吗?
最佳答案
javadoc API中说那:
An agent provides an implementation of this interface in order to transform class files. The transformation occurs before the class is defined by the JVM. Note the term class file is used as defined in the chapter The class File Format of The Java Virtual Machine Specification, to mean a sequence of bytes in class file format, whether or not they reside in a file.
并且类文件规范可以在 http://docs.oracle.com/javase/specs/jvms/se5.0/html/Overview.doc.html#32310 找到
通常,您不需要 java.lang.instrument.*
包。
关于java - Java 中 ClassFileTransformer 的使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12338533/