7

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).

As metadata, how are annotations represented in bytecode?

Cui Pengfei 崔鹏飞
  • 8,017
  • 6
  • 46
  • 87

1 Answers1

7

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)

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130