20230707 java.lang.annotation.Annotation

发布时间 2023-08-24 10:31:29作者: 流星<。)#)))≦

介绍

  • java.lang.annotation.Annotation
  • public interface Annotation
  • 所有的注解接口都隐式地扩展自此接口。这个接口是一个常规接口,不是一个注解接口

API

  • annotationType
    • Class<? extends Annotation> annotationType();
    • 返回该注解的注解接口
    • 依赖于实现的类用于提供注解的实现。因此,在注解上调用 getClass 将返回一个依赖于实现的类。相反,该方法将可靠地返回注解的注解接口