public class GenericAnnotationMapping extends Object implements AnnotationMapping<Annotation>
AnnotationMapping的基本实现,仅仅是简单包装了注解对象| Modifier and Type | Method and Description |
|---|---|
static GenericAnnotationMapping |
create(Annotation annotation,
boolean isRoot)
创建一个通用注解包装类
|
boolean |
equals(Object o)
比较两个实例是否相等
|
Annotation |
getAnnotation()
获取注解对象
|
Method[] |
getAttributes()
获取注解原始属性
|
<R> R |
getAttributeValue(String attributeName,
Class<R> attributeType)
获取属性值
|
Annotation |
getResolvedAnnotation()
|
<R> R |
getResolvedAttributeValue(String attributeName,
Class<R> attributeType)
获取解析后的属性值
|
int |
hashCode()
获取实例哈希值
|
boolean |
isResolved()
总是返回
false |
boolean |
isRoot()
当前注解是否为根注解
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitannotationTypetoStringpublic static GenericAnnotationMapping create(Annotation annotation, boolean isRoot)
annotation - 注解对象isRoot - 是否根注解GenericAnnotationMapping实例public boolean isRoot()
isRoot in interface AnnotationMapping<Annotation>public Annotation getAnnotation()
getAnnotation in interface AnnotationMapping<Annotation>public Annotation getResolvedAnnotation()
getResolvedAnnotation in interface AnnotationMapping<Annotation>public boolean isResolved()
falseisResolved in interface AnnotationMapping<Annotation>falsepublic Method[] getAttributes()
getAttributes in interface AnnotationMapping<Annotation>public <R> R getAttributeValue(String attributeName, Class<R> attributeType)
getAttributeValue in interface AnnotationMapping<Annotation>R - 返回值类型attributeName - 属性名称attributeType - 属性类型public <R> R getResolvedAttributeValue(String attributeName, Class<R> attributeType)
getResolvedAttributeValue in interface AnnotationMapping<Annotation>R - 返回值类型attributeName - 属性名称attributeType - 属性类型public boolean equals(Object o)
equals in interface Annotationequals in class Objecto - 对象public int hashCode()
hashCode in interface AnnotationhashCode in class ObjectCopyright © 2025. All rights reserved.