s-day12-元注解

This commit is contained in:
xx
2026-10-27 11:47:37 +08:00
parent 6afa427872
commit 718ef90dbb
3 changed files with 27 additions and 3 deletions
@@ -0,0 +1,15 @@
package com.inmind.annotation02;
/*
元注解:用来修饰注解的注解
@Target:设置某一个注解的作用范围
ElementType.TYPE
ElementType.FIELD
ElementType.CONSTRUCTOR
ElementType.METHOD
@Retention:设置某一个注解的生命周期
SOURCE:编译时期有效
CLASS:编译后,运行前有效
RUNTIME:运行时有效 (比较常用,结合反射操作)
*/
public class Demo03 {
}