类 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 specifiedAnnotationtype maps fromMethodstatic Map<String,Object>getAttributes(Annotation annotation, boolean ignoreDefaultValue, String... ignoreAttributeNames)Get theAnnotationattributesstatic Map<String,Object>getAttributes(Annotation annotation, org.springframework.core.env.PropertyResolver propertyResolver, boolean ignoreDefaultValue, String... ignoreAttributeNames)Get theAnnotationattributesstatic <A extends Annotation>
booleanisPresent(Method method, Class<A> annotationClass)Is specifiedAnnotationpresent onMethod's declaring class or parameters or itself.static StringresolveInterfaceName(Reference reference, Class<?> defaultInterfaceClass)static StringresolveInterfaceName(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 specifiedAnnotationpresent onMethod's declaring class or parameters or itself.- 类型参数:
A-Annotationtype- 参数:
method-MethodannotationClass-Annotationtype- 返回:
- 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 specifiedAnnotationtype maps fromMethod- 类型参数:
A-Annotationtype- 参数:
method-MethodannotationClass-Annotationtype- 返回:
Annotationtype maps , theElementTypeas key , the list ofAnnotationas value. IfAnnotationwas annotated onMethod's parametersElementType.PARAMETER, the associatedAnnotationlist may contain multiple elements.- 从以下版本开始:
- 2.6.6
-
getAttributes
public static Map<String,Object> getAttributes(Annotation annotation, boolean ignoreDefaultValue, String... ignoreAttributeNames)
Get theAnnotationattributes- 参数:
annotation- specifiedAnnotationignoreDefaultValue- 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 theAnnotationattributes- 参数:
annotation- specifiedAnnotationpropertyResolver-PropertyResolverinstance, e.gEnvironmentignoreDefaultValue- whether ignore default value or notignoreAttributeNames- the attribute names of annotation should be ignored- 返回:
- non-null
- 从以下版本开始:
- 2.6.6
-
-