What is the intended need for RetentionPolicy.CLASS and RetentionPolicy.SOURCE. In which annotation scenario, We can use these? I wanted some examples.
From the Java doc:
CLASS: Annotations are to be recorded in the class file by the compiler but need not be retained by the VM at run time.
- In which scenario, We will go for this as developer?
SOURCE: Annotations are to be discarded by the compiler.
- In which scenario, We will go for this as developer?