The following code specifies the Retention Policy to RUNTIME.
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
@interface MyAnno {
String str();
int val();
}
The following code specifies the Retention Policy to RUNTIME.
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
@interface MyAnno {
String str();
int val();
}