java基础16.2.1 @Retention设置有效范围
1、@Retention可以设置Annotation的有效范围。

3、介绍下RetentionPolicy中的枚举常量。RetentionPolicy.SOURCE:表示不编译Annotation到类文件中,有效范围最小

5、RetentionPolicy.RUNTIME:表示在运行时加载Annotation到JVM中。有效范围最大。

1、@Retention可以设置Annotation的有效范围。
3、介绍下RetentionPolicy中的枚举常量。RetentionPolicy.SOURCE:表示不编译Annotation到类文件中,有效范围最小
5、RetentionPolicy.RUNTIME:表示在运行时加载Annotation到JVM中。有效范围最大。