public class DubboAnnotationUtils extends Object
AnnotationUtils| 构造器和说明 |
|---|
DubboAnnotationUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Map<String,String> |
convertParameters(String[] parameters)
Resolve the parameters of
DubboService
and DubboReference from the specified. |
static String |
resolveInterfaceName(org.springframework.core.annotation.AnnotationAttributes attributes,
Class<?> defaultInterfaceClass)
Resolve the interface name from
AnnotationAttributes |
static String |
resolveInterfaceName(org.apache.dubbo.config.annotation.Reference reference,
Class<?> defaultInterfaceClass)
已过时。
|
static String |
resolveInterfaceName(org.apache.dubbo.config.annotation.Service service,
Class<?> defaultInterfaceClass)
已过时。
|
static Class<?> |
resolveServiceInterfaceClass(org.springframework.core.annotation.AnnotationAttributes attributes,
Class<?> defaultInterfaceClass)
|
@Deprecated public static String resolveInterfaceName(org.apache.dubbo.config.annotation.Service service, Class<?> defaultInterfaceClass) throws IllegalStateException
public static String resolveInterfaceName(org.springframework.core.annotation.AnnotationAttributes attributes, Class<?> defaultInterfaceClass)
AnnotationAttributesattributes - AnnotationAttributes instance, may be @Service or @ReferencedefaultInterfaceClass - the default class of interfaceIllegalStateException - if interface name was not foundpublic static Class<?> resolveServiceInterfaceClass(org.springframework.core.annotation.AnnotationAttributes attributes, Class<?> defaultInterfaceClass) throws IllegalArgumentException
class of Dubbo Service interface from the specified
annotation attributes and annotated class.attributes - annotation attributesdefaultInterfaceClass - the annotated class.class of Dubbo Service interfaceIllegalArgumentException - if can't resolved@Deprecated public static String resolveInterfaceName(org.apache.dubbo.config.annotation.Reference reference, Class<?> defaultInterfaceClass) throws IllegalStateException
public static Map<String,String> convertParameters(String[] parameters)
DubboService
and DubboReference from 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 - Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.