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(Map<String,Object> attributes,
Class<?> defaultInterfaceClass)
Resolve the service interface name from @Service annotation attributes.
|
static String |
resolveInterfaceName(org.apache.dubbo.config.annotation.Reference reference,
Class<?> defaultInterfaceClass)
已过时。
|
static String |
resolveInterfaceName(org.apache.dubbo.config.annotation.Service service,
Class<?> defaultInterfaceClass)
已过时。
|
@Deprecated public static String resolveInterfaceName(org.apache.dubbo.config.annotation.Service service, Class<?> defaultInterfaceClass) throws IllegalStateException
public static String resolveInterfaceName(Map<String,Object> attributes, Class<?> defaultInterfaceClass)
attributes - annotation attributes of @ServicedefaultInterfaceClass - the default class of interfaceIllegalStateException - if interface name was not found@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 iterates elements in order.The former element plays as key or key&value role, it would be
spilt if it contains 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"}
["a","a,b"] ==>{a="a,b"}
parameters - Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.