注解是一个特殊的类,某一个实体类可以通过isAnnotationPresent判断当前类是否被某一个注解类修饰了,若是被修饰的,则开启注入模式。
getAnnotation:返回指定的注解
isAnnotationPresent:判定当前元素是否被指定注解修饰
getAnnotations:返回所有的注解
getDeclaredAnnotation:返回本元素的指定注解
getDeclaredAnnotations:返回本元素的所有注解,不包含父类继承而来的
注解是一个特殊的类,某一个实体类可以通过isAnnotationPresent判断当前类是否被某一个注解类修饰了,若是被修饰的,则开启注入模式。
getAnnotation:返回指定的注解
isAnnotationPresent:判定当前元素是否被指定注解修饰
getAnnotations:返回所有的注解
getDeclaredAnnotation:返回本元素的指定注解
getDeclaredAnnotations:返回本元素的所有注解,不包含父类继承而来的
本文标题:注解
本文链接:https://www.haomeiwen.com/subject/wpxgoqtx.html
网友评论