类 AnnotationUtils
- java.lang.Object
-
- com.alibaba.dubbo.config.spring.util.AnnotationUtils
-
public abstract class AnnotationUtils extends Object
Annotation Utilities Class- 从以下版本开始:
- 2.5.11
- 另请参阅:
AnnotationUtils
-
-
构造器概要
构造器 构造器 说明 AnnotationUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static <A extends Annotation>
Map<ElementType,List<A>>findAnnotations(Method method, Class<A> annotationClass)
Find specifiedAnnotation
type maps fromMethod
static Map<String,Object>
getAttributes(Annotation annotation, boolean ignoreDefaultValue, String... ignoreAttributeNames)
Get theAnnotation
attributesstatic Map<String,Object>
getAttributes(Annotation annotation, org.springframework.core.env.PropertyResolver propertyResolver, boolean ignoreDefaultValue, String... ignoreAttributeNames)
Get theAnnotation
attributesstatic <A extends Annotation>
booleanisPresent(Method method, Class<A> annotationClass)
Is specifiedAnnotation
present onMethod
's declaring class or parameters or itself.static String
resolveInterfaceName(Reference reference, Class<?> defaultInterfaceClass)
static String
resolveInterfaceName(Service service, Class<?> defaultInterfaceClass)
-
-
-
方法详细资料
-
resolveInterfaceName
public static String resolveInterfaceName(Service service, Class<?> defaultInterfaceClass) throws IllegalStateException
-
resolveInterfaceName
public static String resolveInterfaceName(Reference reference, Class<?> defaultInterfaceClass) throws IllegalStateException
-
isPresent
public static <A extends Annotation> boolean isPresent(Method method, Class<A> annotationClass)
Is specifiedAnnotation
present onMethod
's declaring class or parameters or itself.- 类型参数:
A
-Annotation
type- 参数:
method
-Method
annotationClass
-Annotation
type- 返回:
- If present , return
true
, orfalse
- 从以下版本开始:
- 2.6.6
-
findAnnotations
public static <A extends Annotation> Map<ElementType,List<A>> findAnnotations(Method method, Class<A> annotationClass)
Find specifiedAnnotation
type maps fromMethod
- 类型参数:
A
-Annotation
type- 参数:
method
-Method
annotationClass
-Annotation
type- 返回:
Annotation
type maps , theElementType
as key , the list ofAnnotation
as value. IfAnnotation
was annotated onMethod
's parametersElementType.PARAMETER
, the associatedAnnotation
list may contain multiple elements.- 从以下版本开始:
- 2.6.6
-
getAttributes
public static Map<String,Object> getAttributes(Annotation annotation, boolean ignoreDefaultValue, String... ignoreAttributeNames)
Get theAnnotation
attributes- 参数:
annotation
- specifiedAnnotation
ignoreDefaultValue
- whether ignore default value or notignoreAttributeNames
- the attribute names of annotation should be ignored- 返回:
- non-null
- 从以下版本开始:
- 2.6.6
-
getAttributes
public static Map<String,Object> getAttributes(Annotation annotation, org.springframework.core.env.PropertyResolver propertyResolver, boolean ignoreDefaultValue, String... ignoreAttributeNames)
Get theAnnotation
attributes- 参数:
annotation
- specifiedAnnotation
propertyResolver
-PropertyResolver
instance, e.gEnvironment
ignoreDefaultValue
- whether ignore default value or notignoreAttributeNames
- the attribute names of annotation should be ignored- 返回:
- non-null
- 从以下版本开始:
- 2.6.6
-
-