类 DubboAnnotationUtils
- java.lang.Object
-
- org.apache.dubbo.config.spring.util.DubboAnnotationUtils
-
public class DubboAnnotationUtils extends Object
Dubbo Annotation Utilities Class- 从以下版本开始:
- 2.5.11
- 另请参阅:
AnnotationUtils
-
-
构造器概要
构造器 构造器 说明 DubboAnnotationUtils()
-
方法概要
所有方法 静态方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static Map<String,String>convertParameters(String[] parameters)Resolve the parameters ofDubboServiceandDubboReferencefrom the specified.static StringresolveInterfaceName(org.apache.dubbo.config.annotation.Reference reference, Class<?> defaultInterfaceClass)已过时。static StringresolveInterfaceName(org.apache.dubbo.config.annotation.Service service, Class<?> defaultInterfaceClass)已过时。static StringresolveInterfaceName(org.springframework.core.annotation.AnnotationAttributes attributes, Class<?> defaultInterfaceClass)Resolve the interface name fromAnnotationAttributesstatic Class<?>resolveServiceInterfaceClass(org.springframework.core.annotation.AnnotationAttributes attributes, Class<?> defaultInterfaceClass)
-
-
-
方法详细资料
-
resolveInterfaceName
@Deprecated public static String resolveInterfaceName(org.apache.dubbo.config.annotation.Service service, Class<?> defaultInterfaceClass) throws IllegalStateException
已过时。
-
resolveInterfaceName
public static String resolveInterfaceName(org.springframework.core.annotation.AnnotationAttributes attributes, Class<?> defaultInterfaceClass)
Resolve the interface name fromAnnotationAttributes- 参数:
attributes-AnnotationAttributesinstance, may be@Serviceor@ReferencedefaultInterfaceClass- the defaultclassof interface- 返回:
- the interface name if found
- 抛出:
IllegalStateException- if interface name was not found
-
resolveServiceInterfaceClass
public static Class<?> resolveServiceInterfaceClass(org.springframework.core.annotation.AnnotationAttributes attributes, Class<?> defaultInterfaceClass) throws IllegalArgumentException
Resolve theclassof Dubbo Service interface from the specifiedannotation attributesand annotatedclass.- 参数:
attributes-annotation attributesdefaultInterfaceClass- the annotatedclass.- 返回:
- the
classof Dubbo Service interface - 抛出:
IllegalArgumentException- if can't resolved
-
resolveInterfaceName
@Deprecated public static String resolveInterfaceName(org.apache.dubbo.config.annotation.Reference reference, Class<?> defaultInterfaceClass) throws IllegalStateException
已过时。
-
convertParameters
public static Map<String,String> convertParameters(String[] parameters)
Resolve the parameters ofDubboServiceandDubboReferencefrom the specified. It iterate elements in order.The former element plays as key or key&value role, it would be spilt if it contain specific string, for instance, ":" and "=". As for later element can't be split in anytime.It will throw IllegalArgumentException If converted array length isn't even number. The convert cases below work in right way,which are best practice.(array->map) ["a","b"] ==> {a=b} [" a "," b "] ==> {a=b} ["a=b"] ==>{a=b} ["a:b"] ==>{a=b} ["a=b","c","d"] ==>{a=b,c=d} ["a","a:b"] ==>{a=a:b}
- 参数:
parameters-- 返回:
-
-