如何Java注释重新$ P $在Java字节code psented [英] how is java annotation represented in java bytecode

查看:265
本文介绍了如何Java注释重新$ P $在Java字节code psented的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译包含JUnit测试.class文件。
我读了字节code,但我没有看到@Test标注的任何线索(它在Java源$ C ​​$ C使用)。

I tried to decompile a .class file that contains JUnit tests. I read the byte code, but I did not see any clue of the @Test annotation(it's used in the java source code).

作为元数据,如何重新注释以字节code psented $ P $?

As metadata, how are annotations represented in bytecode?

推荐答案

注解刚刚出现的事情字节code之前,与它相关联。如果您没有看到标注它可能是一个旧的去编译器(其中大部分是)

Annotations appear just before the byte code of the thing it is associated with. If you are not seeing the annotations it could be an old de-compiler (most of them are)

这篇关于如何Java注释重新$ P $在Java字节code psented的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆