public class ConfigValueHelper extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected static Pattern |
NORMAL
可用的字符串为:英文大小写,数字,横杆-,下划线_,点.
!
|
protected static Pattern |
NORMAL_COLON
可用的字符串为:英文大小写,数字,横杆-,下划线_,点.
|
protected static Pattern |
NORMAL_COMMA
可用的字符串为:英文大小写,数字,横杆-,下划线_,点.
|
protected static Pattern |
NORMAL_COMMA_COLON
可用的字符串为:英文大小写,数字,横杆-,下划线_,点.
|
protected static Pattern |
NORMAL_SEMICOLON
可用的字符串为:英文大小写,数字,横杆-,下划线_,点.
|
protected static Pattern |
NORMAL_SEMICOLON_COLON
可用的字符串为:英文大小写,数字,横杆-,下划线_,点.
|
| 构造器和说明 |
|---|
ConfigValueHelper() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected static boolean |
assertFalse(String string)
判断字符串是否为空或"false"或"null"
|
protected static void |
checkNormal(String configKey,
String configValue)
检查字符串是否是正常值,不是则抛出异常
|
protected static void |
checkNormalWithColon(String configKey,
String configValue)
检查字符串是否是正常值(含冒号),不是则抛出异常
|
protected static void |
checkNormalWithComma(String configKey,
String configValue)
检查字符串是否是正常值(含逗号),不是则抛出异常
|
protected static void |
checkNormalWithCommaColon(String configKey,
String configValue)
检查字符串是否是正常值(含冒号),不是则抛出异常
|
protected static void |
checkNotNegativeInteger(String configKey,
int configValue)
检查数字是否为非负数(>=0)
|
protected static void |
checkPattern(String configKey,
String configValue,
Pattern pattern,
String message)
根据正则表达式检查字符串是否是正常值(含冒号),不是则抛出异常
|
protected static void |
checkPositiveInteger(String configKey,
int configValue)
检查数字是否为正整数(>0)
|
protected static boolean |
match(Pattern pattern,
String configValue)
匹配正常字符串
|
protected static final Pattern NORMAL
protected static final Pattern NORMAL_COMMA
protected static final Pattern NORMAL_COLON
protected static final Pattern NORMAL_SEMICOLON
protected static final Pattern NORMAL_COMMA_COLON
protected static final Pattern NORMAL_SEMICOLON_COLON
protected static boolean assertFalse(String string)
string - 字符串protected static boolean match(Pattern pattern, String configValue)
configValue - 配置项protected static void checkNormal(String configKey, String configValue) throws SofaRpcRuntimeException
configKey - 配置项configValue - 配置值SofaRpcRuntimeException - 非法异常protected static void checkNormalWithComma(String configKey, String configValue) throws SofaRpcRuntimeException
configKey - 配置项configValue - 配置值SofaRpcRuntimeException - 非法异常protected static void checkNormalWithColon(String configKey, String configValue) throws SofaRpcRuntimeException
configKey - 配置项configValue - 配置值SofaRpcRuntimeException - 非法异常protected static void checkNormalWithCommaColon(String configKey, String configValue) throws SofaRpcRuntimeException
configKey - 配置项configValue - 配置值SofaRpcRuntimeException - 非法异常protected static void checkPattern(String configKey, String configValue, Pattern pattern, String message) throws SofaRpcRuntimeException
configKey - 配置项configValue - 配置值pattern - 正则表达式message - 消息SofaRpcRuntimeExceptionprotected static void checkPositiveInteger(String configKey, int configValue) throws SofaRpcRuntimeException
configKey - 配置项configValue - 配置值SofaRpcRuntimeException - 非法异常protected static void checkNotNegativeInteger(String configKey, int configValue) throws SofaRpcRuntimeException
configKey - 配置项configValue - 配置值SofaRpcRuntimeException - 非法异常Copyright © 2008–2018 The Ant Financial. All rights reserved.