public class CombinationAnnotationElement extends Object implements AnnotatedElement, Serializable
| 限定符和类型 | 字段和说明 |
|---|---|
private Map<Class<? extends Annotation>,Annotation> |
annotationMap
注解类型与注解对象对应表
|
private Map<Class<? extends Annotation>,Annotation> |
declaredAnnotationMap
直接注解类型与注解对象对应表
|
private static Set<Class<? extends Annotation>> |
META_ANNOTATIONS
元注解
|
private static long |
serialVersionUID |
| 构造器和说明 |
|---|
CombinationAnnotationElement(AnnotatedElement element)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T extends Annotation> |
getAnnotation(Class<T> annotationClass) |
Annotation[] |
getAnnotations() |
Annotation[] |
getDeclaredAnnotations() |
private void |
init(AnnotatedElement element)
初始化
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass) |
private void |
parse(Annotation[] annotations)
进行递归解析注解,直到全部都是元注解为止
|
private void |
parseDeclared(Annotation[] annotations)
进行递归解析注解,直到全部都是元注解为止
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByTypeprivate static final long serialVersionUID
private static final Set<Class<? extends Annotation>> META_ANNOTATIONS
private Map<Class<? extends Annotation>,Annotation> annotationMap
private Map<Class<? extends Annotation>,Annotation> declaredAnnotationMap
public CombinationAnnotationElement(AnnotatedElement element)
element - 需要解析注解的元素:可以是Class、Method、Field、Constructor、ReflectPermissionpublic boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
isAnnotationPresent 在接口中 AnnotatedElementpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass)
getAnnotation 在接口中 AnnotatedElementpublic Annotation[] getAnnotations()
getAnnotations 在接口中 AnnotatedElementpublic Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations 在接口中 AnnotatedElementprivate void init(AnnotatedElement element)
element - 元素private void parseDeclared(Annotation[] annotations)
annotations - Class, Method, Field等private void parse(Annotation[] annotations)
annotations - Class, Method, Field等Copyright © 2020. All rights reserved.