Friday 27 June 2014

RetentionPolicy.CLASS

RetentionPolicy.CLASS : The marked annotation is retained by the compiler at compile time, but is ignored by the Java Virtual Machine (JVM). Annotations are to be recorded in the class file by the compiler but need not be retained by the VM at run time.

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.CLASS)
@interface MyAnnotation2{
    String value();
}



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment