类 PropertyResolverComposite
java.lang.Object
cn.taketoday.core.env.PropertyResolverComposite
- 所有已实现的接口:
IterablePropertyResolver,PropertyResolver,Iterable<String>
public class PropertyResolverComposite
extends Object
implements PropertyResolver, IterablePropertyResolver
Composite PropertyResolver implementation
- 从以下版本开始:
- 4.0
- 作者:
- TODAY 2021/10/5 00:02
-
构造器概要
构造器构造器说明PropertyResolverComposite(PropertyResolver... resolvers) PropertyResolverComposite(List<PropertyResolver> resolverList) -
方法概要
修饰符和类型方法说明booleancontainsProperty(String key) Return whether the given property key is available for resolution, i.e. if the value for the given key is notnull.getProperty(String key) Return the property value associated with the given key, ornullif the key cannot be resolved.<T> TgetProperty(String key, Class<T> targetType) Return the property value associated with the given key, ornullif the key cannot be resolved.<T> TgetProperty(String key, Class<T> targetType, T defaultValue) Return the property value associated with the given key, ordefaultValueif the key cannot be resolved.getProperty(String key, String defaultValue) Return the property value associated with the given key, ordefaultValueif the key cannot be resolved.Return the property value associated with the given key (nevernull).<T> TgetRequiredProperty(String key, Class<T> targetType) Return the property value associated with the given key, converted to the given targetType (nevernull).iterator()Returns an iterator of property-names.resolvePlaceholders(String text) Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved byPropertyResolver.getProperty(java.lang.String).Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved byPropertyResolver.getProperty(java.lang.String).从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 java.lang.Iterable
forEach, spliterator从接口继承的方法 cn.taketoday.core.env.PropertyResolver
getFlag, getFlag
-
构造器详细资料
-
PropertyResolverComposite
-
PropertyResolverComposite
-
-
方法详细资料
-
containsProperty
从接口复制的说明:PropertyResolverReturn whether the given property key is available for resolution, i.e. if the value for the given key is notnull.- 指定者:
containsProperty在接口中PropertyResolver
-
getProperty
从接口复制的说明:PropertyResolverReturn the property value associated with the given key, ornullif the key cannot be resolved.- 指定者:
getProperty在接口中PropertyResolver- 参数:
key- the property name to resolve- 另请参阅:
-
getProperty
从接口复制的说明:PropertyResolverReturn the property value associated with the given key, ordefaultValueif the key cannot be resolved.- 指定者:
getProperty在接口中PropertyResolver- 参数:
key- the property name to resolvedefaultValue- the default value to return if no value is found- 另请参阅:
-
getProperty
从接口复制的说明:PropertyResolverReturn the property value associated with the given key, ornullif the key cannot be resolved.- 指定者:
getProperty在接口中PropertyResolver- 参数:
key- the property name to resolvetargetType- the expected type of the property value- 另请参阅:
-
getProperty
从接口复制的说明:PropertyResolverReturn the property value associated with the given key, ordefaultValueif the key cannot be resolved.- 指定者:
getProperty在接口中PropertyResolver- 参数:
key- the property name to resolvetargetType- the expected type of the property valuedefaultValue- the default value to return if no value is found- 另请参阅:
-
getRequiredProperty
从接口复制的说明:PropertyResolverReturn the property value associated with the given key (nevernull).- 指定者:
getRequiredProperty在接口中PropertyResolver- 抛出:
IllegalStateException- if the key cannot be resolved- 另请参阅:
-
getRequiredProperty
从接口复制的说明:PropertyResolverReturn the property value associated with the given key, converted to the given targetType (nevernull).- 指定者:
getRequiredProperty在接口中PropertyResolver- 抛出:
IllegalStateException- if the given key cannot be resolved
-
resolvePlaceholders
从接口复制的说明:PropertyResolverResolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved byPropertyResolver.getProperty(java.lang.String). Unresolvable placeholders with no default value are ignored and passed through unchanged.- 指定者:
resolvePlaceholders在接口中PropertyResolver- 参数:
text- the String to resolve- 返回:
- the resolved String (never
null) - 另请参阅:
-
resolveRequiredPlaceholders
从接口复制的说明:PropertyResolverResolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved byPropertyResolver.getProperty(java.lang.String). Unresolvable placeholders with no default value will cause an IllegalArgumentException to be thrown.- 指定者:
resolveRequiredPlaceholders在接口中PropertyResolver- 返回:
- the resolved String (never
null) - 抛出:
IllegalArgumentException- if given text isnullor if any placeholders are unresolvable
-
iterator
从接口复制的说明:IterablePropertyResolverReturns an iterator of property-names.- 指定者:
iterator在接口中Iterable<String>- 指定者:
iterator在接口中IterablePropertyResolver- 返回:
- a property-names Iterator.
-