1234567891011121314151617181920 |
- package J20250807.annoation;
- import java.lang.annotation.*;
- /**
- * @author WanJl
- * @version 1.0
- * @title Demo01_Annotation
- * @description
- * @create 2025/8/7
- */
- //说明当前的Demo01_Annotation注解可以放在类上面、方法上面、成员变量上面
- @Target({ElementType.FIELD,ElementType.TYPE,ElementType.METHOD})
- //指定该注解的存活时间为一直到程序运行之后
- @Retention(RetentionPolicy.RUNTIME)
- @Inherited //表示这个注解可以被子类继承
- public @interface Demo01_Annotation {
- }
|