When Java source code is compiled, the Java compiler conditionally stores annotation metadata in the class files if the annotation has a RetentionPolicy of CLASS or RUNTIME.
When Java source code is compiled, annotations can be processed by compiler plug-ins called annotation processors. The Java compiler conditionally stores annotation metadata in the class files if the annotation has a RetentionPolicy of CLASS or RUNTIME.