public abstract class AbstractAnnotationTypeMeta extends Object implements IAnnotationTypeMeta
project: heaven-AnnotationMeta
create on 2019/11/29 23:04
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractAnnotationTypeMeta() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
getAnnotatedAttr(Class<? extends Annotation> clazz,
String methodName)
获取被当前注解指定的属性信息
|
Annotation |
getAnnotation(String annotationName)
Determine whether the underlying element has an annotation
of the given type defined.
|
Object |
getAnnotationAttr(Annotation annotation,
String methodName)
获取当前注解对应的属性信息
|
Map<String,Object> |
getAnnotationAttributes(String annotationName)
Retrieve the attributes of the annotation of the given type, if any (i.e. if
defined on the underlying element, as direct annotation),
also taking attribute overrides on composed annotations into account.
|
Object |
getAnnotationOrRefAttribute(String annotationName,
String attrMethodName)
Retrieve the attributes of the annotation of the given type, if any (i.e. if
defined on the underlying element, as direct annotation or meta-annotation),
also taking attribute overrides on composed annotations into account.
|
Map<String,Object> |
getAnnotationOrRefAttributes(String annotationName)
Retrieve the attributes of the annotation of the given type, if any (i.e. if
defined on the underlying element, as direct annotation or meta-annotation),
also taking attribute overrides on composed annotations into account.
|
List<Annotation> |
getAnnotationOrRefs(String annotationName)
Determine whether the underlying element has an annotation or meta-annotation
of the given type defined.
|
Annotation |
getAnnotationReferenced(String annotationName,
String annotationRefName)
获取被引用的注解基本信息
|
Object |
getAnnotationReferencedAttr(Class<? extends Annotation> clazz,
String methodName)
获取被当前注解为元注解的的属性信息
|
List<Annotation> |
getAnnotationRefs(String annotationName)
获取指定类型的所有相关注解
(1)排除直接注解本身
|
protected abstract Annotation[] |
getAnnotations()
获取对应的注解信息列表
(1)这里其实没有必要使用
Map 因为一般注解数量不会太多,只是数组性能反而更好。 |
boolean |
isAnnotated(String annotationName)
Determine whether the underlying element has an annotation
of the given type defined.
|
boolean |
isAnnotatedOrRef(List<Class> classList)
Determine whether the underlying element has an annotation or meta-annotation
of the given type defined.
|
boolean |
isAnnotatedOrRef(String annotationName)
Determine whether the underlying element has an annotation or meta-annotation
of the given type defined.
|
boolean |
isAnnotationRef(Class clazz)
是否被引用了指定的注解
|
protected abstract Annotation[] getAnnotations()
Map 因为一般注解数量不会太多,只是数组性能反而更好。public boolean isAnnotated(String annotationName)
IAnnotationTypeMetaIf this method returns true, then
IAnnotationTypeMeta.getAnnotationAttributes(java.lang.String) will return a non-null Map.
isAnnotated 在接口中 IAnnotationTypeMetaannotationName - the fully qualified class name of the annotation
type to look forpublic Annotation getAnnotation(String annotationName)
IAnnotationTypeMetagetAnnotation 在接口中 IAnnotationTypeMetaannotationName - the fully qualified class name of the annotation
type to look forpublic boolean isAnnotatedOrRef(String annotationName)
IAnnotationTypeMetaIf this method returns true, then
IAnnotationTypeMeta.getAnnotationAttributes(java.lang.String) will return a non-null Map.
isAnnotatedOrRef 在接口中 IAnnotationTypeMetaannotationName - the fully qualified class name of the annotation
type to look forpublic boolean isAnnotatedOrRef(List<Class> classList)
IAnnotationTypeMetaIf this method returns true, then
IAnnotationTypeMeta.getAnnotationAttributes(java.lang.String) will return a non-null Map.
isAnnotatedOrRef 在接口中 IAnnotationTypeMetaclassList - the fully qualified class name list of the annotation
type to look forpublic boolean isAnnotationRef(Class clazz)
IAnnotationTypeMetaisAnnotationRef 在接口中 IAnnotationTypeMetaclazz - 类信息public List<Annotation> getAnnotationOrRefs(String annotationName)
IAnnotationTypeMetagetAnnotationOrRefs 在接口中 IAnnotationTypeMetaannotationName - the fully qualified class name of the annotation
type to look for直接注解,
元注解-间接饮用public List<Annotation> getAnnotationRefs(String annotationName)
IAnnotationTypeMetagetAnnotationRefs 在接口中 IAnnotationTypeMetaannotationName - 注解名称public Annotation getAnnotationReferenced(String annotationName, String annotationRefName)
IAnnotationTypeMetagetAnnotationReferenced 在接口中 IAnnotationTypeMetaannotationName - 注解名称annotationRefName - 引用注解名称首先执行这个获取引用public Map<String,Object> getAnnotationAttributes(String annotationName)
IAnnotationTypeMetagetAnnotationAttributes 在接口中 IAnnotationTypeMetaannotationName - the fully qualified class name of the annotation
type to look fornull if no matching annotation is defined.public Map<String,Object> getAnnotationOrRefAttributes(String annotationName)
IAnnotationTypeMetagetAnnotationOrRefAttributes 在接口中 IAnnotationTypeMetaannotationName - the fully qualified class name of the annotation
type to look fornull if no matching annotation is defined.public Object getAnnotationOrRefAttribute(String annotationName, String attrMethodName)
IAnnotationTypeMetagetAnnotationOrRefAttribute 在接口中 IAnnotationTypeMetaannotationName - the fully qualified class name of the annotation
type to look forattrMethodName - the annotation method name to look fornull if no matching annotation is defined.public Object getAnnotationAttr(Annotation annotation, String methodName)
IAnnotationTypeMetagetAnnotationAttr 在接口中 IAnnotationTypeMetaannotation - 注解类methodName - 方法名称public Object getAnnotatedAttr(Class<? extends Annotation> clazz, String methodName)
IAnnotationTypeMetagetAnnotatedAttr 在接口中 IAnnotationTypeMetaclazz - 注解类methodName - 方法名称public Object getAnnotationReferencedAttr(Class<? extends Annotation> clazz, String methodName)
IAnnotationTypeMetagetAnnotationReferencedAttr 在接口中 IAnnotationTypeMetaclazz - 注解类methodName - 方法名称Copyright © 2024. All rights reserved.