0
点赞
收藏
分享

微信扫一扫

Java元注解(meta-annotation)负责注解其他注解,Java定义了4个元注解(@Target @Retention @Ducumented @Inherited)

惠特曼 2022-03-24 阅读 45


Java元注解(meta-annotation)负责注解其他注解,Java定义了4个元注解(@Target @Retention @Ducumented @Inherited)

在java.lang.annotation包可以找到

@Target 描述注解的使用范围

@Retention 描述什么级别生命周期(Source>Class>Runtime)一般用Runtime运行时有效

@Ducumented 说明包含在Javadoc中

@Inherited 说明子类可以继承该注解



举报

相关推荐

0 条评论