Class GenericAnnotationMapping
java.lang.Object
org.miaixz.bus.core.lang.annotation.resolve.GenericAnnotationMapping
- All Implemented Interfaces:
Annotation,AnnotationMapping<Annotation>
AnnotationMapping的基本实现,仅仅是简单包装了注解对象- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GenericAnnotationMappingcreate(Annotation annotation, boolean isRoot) 创建一个通用注解包装类boolean比较两个实例是否相等获取注解对象Method[]获取注解原始属性<R> RgetAttributeValue(String attributeName, Class<R> attributeType) 获取属性值<R> RgetResolvedAttributeValue(String attributeName, Class<R> attributeType) 获取解析后的属性值inthashCode()获取实例哈希值boolean总是返回falsebooleanisRoot()当前注解是否为根注解Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.annotation.Annotation
toStringMethods inherited from interface org.miaixz.bus.core.lang.annotation.resolve.AnnotationMapping
annotationType
-
Constructor Details
-
GenericAnnotationMapping
创建一个通用注解包装类- Parameters:
annotation- 注解对象isRoot- 是否根注解
-
-
Method Details
-
create
创建一个通用注解包装类- Parameters:
annotation- 注解对象isRoot- 是否根注解- Returns:
GenericAnnotationMapping实例
-
isRoot
public boolean isRoot()当前注解是否为根注解- Specified by:
isRootin interfaceAnnotationMapping<Annotation>- Returns:
- 是否
-
getAnnotation
获取注解对象- Specified by:
getAnnotationin interfaceAnnotationMapping<Annotation>- Returns:
- 注解对象
-
getResolvedAnnotation
- Specified by:
getResolvedAnnotationin interfaceAnnotationMapping<Annotation>- Returns:
- 注解对象
-
isResolved
public boolean isResolved()总是返回false- Specified by:
isResolvedin interfaceAnnotationMapping<Annotation>- Returns:
false
-
getAttributes
获取注解原始属性- Specified by:
getAttributesin interfaceAnnotationMapping<Annotation>- Returns:
- 注解属性
-
getAttributeValue
获取属性值- Specified by:
getAttributeValuein interfaceAnnotationMapping<Annotation>- Type Parameters:
R- 返回值类型- Parameters:
attributeName- 属性名称attributeType- 属性类型- Returns:
- 属性值
-
getResolvedAttributeValue
获取解析后的属性值- Specified by:
getResolvedAttributeValuein interfaceAnnotationMapping<Annotation>- Type Parameters:
R- 返回值类型- Parameters:
attributeName- 属性名称attributeType- 属性类型- Returns:
- 属性值
-
equals
比较两个实例是否相等- Specified by:
equalsin interfaceAnnotation- Overrides:
equalsin classObject- Parameters:
o- 对象- Returns:
- 是否
-
hashCode
public int hashCode()获取实例哈希值- Specified by:
hashCodein interfaceAnnotation- Overrides:
hashCodein classObject- Returns:
- 哈希值
-