Actually, when you define an annotation, you must specify the parameter @Retention, which defines whether the annotation is available in the source code (SOURCE), in the class files (CLASS), or at run time (RUNTIME).
@Retention(RetentionPolicy.RUNTIME)
public @interface MyAnnotation {}