本文整理汇总了Java中com.alibaba.dubbo.config.support.Parameter类的典型用法代码示例。如果您正苦于以下问题:Java Parameter类的具体用法?Java Parameter怎么用?Java Parameter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Parameter类属于com.alibaba.dubbo.config.support包,在下文中一共展示了Parameter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: appendAttributes
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
protected static void appendAttributes(Map<Object, Object> parameters, Object config, String prefix) {
if (config == null) {
return;
}
Method[] methods = config.getClass().getMethods();
for (Method method : methods) {
try {
String name = method.getName();
if ((name.startsWith("get") || name.startsWith("is"))
&& ! "getClass".equals(name)
&& Modifier.isPublic(method.getModifiers())
&& method.getParameterTypes().length == 0
&& isPrimitive(method.getReturnType())) {
Parameter parameter = method.getAnnotation(Parameter.class);
if (parameter == null || !parameter.attribute())
continue;
String key;
if (parameter != null && parameter.key() != null && parameter.key().length() > 0) {
key = parameter.key();
} else {
int i = name.startsWith("get") ? 3 : 2;
key = name.substring(i, i + 1).toLowerCase() + name.substring(i + 1);
}
Object value = method.invoke(config, new Object[0]);
if (value != null) {
if (prefix != null && prefix.length() > 0) {
key = prefix + "." + key;
}
parameters.put(key, value);
}
}
} catch (Exception e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
}
示例2: getOninvoke
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(key = Constants.ON_INVOKE_INSTANCE_KEY, excluded = true, attribute = true)
public Object getOninvoke() {
return oninvoke;
}
示例3: getAddress
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(excluded = true)
public String getAddress() {
return address;
}
示例4: getTransport
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
/**
* @deprecated
* @see #getTransporter()
* @return transport
*/
@Deprecated
@Parameter(excluded = true)
public String getTransport() {
return getTransporter();
}
示例5: getOnreturnMethod
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(key = Constants.ON_RETURN_METHOD_KEY, excluded = true, attribute = true)
public String getOnreturnMethod() {
return onreturnMethod;
}
示例6: getPath
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Deprecated
@Parameter(excluded = true)
public String getPath() {
return getContextpath();
}
示例7: isDefault
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(excluded = true)
public Boolean isDefault() {
return isDefault;
}
示例8: getFilter
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(key = Constants.REFERENCE_FILTER_KEY, append = true)
public String getFilter() {
return super.getFilter();
}
示例9: getDispather
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
/**
* 单词拼写错误,请使用{@link #getDispatcher()}
* @deprecated {@link #getDispatcher()}
*/
@Deprecated
@Parameter(excluded = true)
public String getDispather() {
return getDispatcher();
}
示例10: getContextpath
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(excluded = true)
public String getContextpath() {
return contextpath;
}
示例11: getIndex
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(excluded = true)
public Integer getIndex() {
return index;
}
示例12: getPrompt
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(escaped = true)
public String getPrompt() {
return prompt;
}
示例13: getHost
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(excluded = true)
public String getHost() {
return host;
}
示例14: getVersion
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(key = "application.version")
public String getVersion() {
return version;
}
示例15: getProtocol
import com.alibaba.dubbo.config.support.Parameter; //导入依赖的package包/类
@Parameter(excluded = true)
public String getProtocol() {
return protocol;
}