Package org.aoju.bus.core
Class Binder
java.lang.Object
org.aoju.bus.core.Binder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T绑定属性到类<T> T绑定指定前缀属性到类<T> T绑定属性到对象实例protected StringparseStringValue(String value, Properties properties, Set<String> visitedPlaceholders) 替换字符串replacePlaceholders(String value, Properties properties) 替换所有占位格式${name}
-
Field Details
-
DEFAULT_PLACEHOLDER_PREFIX
-
DEFAULT_PLACEHOLDER_SUFFIX
-
DEFAULT_VALUE_SEPARATOR
-
DEFAULT_HELPER
默认实例
-
-
Constructor Details
-
Binder
-
Binder
-
-
Method Details
-
bind
绑定属性到类- Type Parameters:
T- 泛型- Parameters:
clazz- 类型- Returns:
- the object
-
bind
-
bind
绑定属性到对象实例- Type Parameters:
T- 泛型- Parameters:
object- 对象实例prefix- 属性前缀- Returns:
- the object
-
replacePlaceholders
替换所有占位格式${name}- Parameters:
value- 需要转换的属性properties- 配置集合- Returns:
- 替换后的字符串
-
parseStringValue
protected String parseStringValue(String value, Properties properties, Set<String> visitedPlaceholders) 替换字符串- Parameters:
value- 字符串properties- 属性visitedPlaceholders- 参数占位符- Returns:
- 替换后的字符串
-