Java元注解(meta-annotation)负责注解其他注解,Java定义了4个元注解(@Target @Retention @Ducumented @Inherited)
在java.lang.annotation包可以找到
@Target 描述注解的使用范围
@Retention 描述什么级别生命周期(Source>Class>Runtime)一般用Runtime运行时有效
@Ducumented 说明包含在Javadoc中
@Inherited 说明子类可以继承该注解
Java元注解(meta-annotation)负责注解其他注解,Java定义了4个元注解(@Target @Retention @Ducumented @Inherited)
在java.lang.annotation包可以找到
@Target 描述注解的使用范围
@Retention 描述什么级别生命周期(Source>Class>Runtime)一般用Runtime运行时有效
@Ducumented 说明包含在Javadoc中
@Inherited 说明子类可以继承该注解