gpt4 book ai didi

java - Java 中 ClassFileTransformer 的使用

转载 作者:行者123 更新时间:2023-12-01 05:08:47 25 4
gpt4 key购买 nike

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com