public interface AnnotationAttribute
| 限定符和类型 | 方法和说明 |
|---|---|
Class<?> |
getAttributeType()
获取属性类型,如果是数组,则是数组元素的类型
|
<A> A |
getFirstValue(Annotation instance)
返回指定注解实例的属性值,如果属性是数组,则返回第一个值
|
String |
getName()
获取注解属性名称,其实就是方法名称
|
<A> A |
getValue(Annotation instance)
返回指定注解实例的属性值
|
boolean |
isAnnotation()
判断返回值是否是注解
|
boolean |
isArray()
判断返回值是否是数组
|
boolean |
isEnum()
判断是否是枚举值
|
static AnnotationAttribute |
of(Method method)
创建指定属性方法的属性元
|
static AnnotationAttribute of(Method method)
method - 注解属性方法String getName()
boolean isArray()
trueboolean isAnnotation()
trueboolean isEnum()
trueClass<?> getAttributeType()
<A> A getValue(Annotation instance)
A - 属性类型instance - 注解实例<A> A getFirstValue(Annotation instance)
A - 属性类型instance - 注解实例Copyright © 2020. All rights reserved.