java - 为什么java反编译器不保存注解

标签 java decompiling decompiler

<分区>

为什么反编译出来的java文件没有注解?

最佳答案

一些注释将其保留设置为仅源代码。

参见 Annotation Retention Policy :

Annotation retention policy. The constants of this enumerated type describe the various policies for retaining annotations. They are used in conjunction with the Retention meta-annotation type to specify how long annotations are to be retained ..

.. SOURCE Annotations are to be discarded by the compiler.

关于java - 为什么java反编译器不保存注解,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15219183/

相关文章:

Java同步迭代器?

vb6 - 免费的 VB 6.0 反编译器?

android - 反编译(二进制,NDK)C 应用程序与 Java 应用程序(Dalvik 字节码)

java - dex2jar 和 jd-GUI 的替代品?

java - 如何反编译jd-gui反编译器无法反编译的Java类文件?

java - 将 ArrayList 转换为 String 以传递给 Servlet,然后再转换回来

java - Bean创建异常: autowired dependencies failed with another maven spring project

java - 在 Selenium 中获取页面对象元素的 Null 值

java - "java decompiler"JD-Core 0.6.0/JD-GUI 0.3.3反编译代码含义

java - 尝试使用 javap.exe 反编译 java .class 文件