Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does java decompiler does not save annotations [closed]

Why a decompiled java files does not have any annotations in it?

like image 422
abhinav Avatar asked Mar 05 '13 08:03

abhinav


1 Answers

Some annotations have their retention set to source code only.

See the 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.

like image 153
Alex Gittemeier Avatar answered Oct 19 '22 12:10

Alex Gittemeier