java - Java 中 ClassFileTransformer 的使用

标签 java profiling

实时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/

相关文章:

java - 无状态 Enterprise Bean 中的 Web 服务客户端

java - Files.readAllLines() 执行时间更改

java - 如何从 python 脚本设置系统属性以在 Java 代码中使用它?

asp.net-mvc - 在生产代码中保留 MiniProfiler 的 ProfiledDbConnection 是否安全?

java - 分析 JNI 应用程序

go - 我的代码都没有出现在 Golang 内存分析器输出中

java - Jersey 工厂尝试创建 @Context 变量两次

java - 随机元素作为输入并获取值

c++ - 分析嵌入式应用程序

profiling - 如何在 Pytorch 中逐层分析?