|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PropertyResolver
Interface for resolving properties against any underlying source.
| Method Summary | ||
|---|---|---|
boolean |
containsProperty(String key)
Return whether the given property key is available for resolution. |
|
String |
getProperty(String key)
Return the property value associated with the given key. |
|
|
getProperty(String key,
Class<T> targetType)
Return the property value associated with the given key, or null
if the key cannot be resolved. |
|
String |
getRequiredProperty(String key)
Return the property value associated with the given key, converted to the given targetType (never null). |
|
|
getRequiredProperty(String key,
Class<T> targetType)
Return the property value associated with the given key, converted to the given targetType (never null). |
|
String |
resolvePlaceholders(String text)
Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by getProperty(java.lang.String). |
|
String |
resolveRequiredPlaceholders(String text)
Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by getProperty(java.lang.String). |
|
| Method Detail |
|---|
boolean containsProperty(String key)
String getProperty(String key)
getProperty(String, Class)
<T> T getProperty(String key,
Class<T> targetType)
null
if the key cannot be resolved.
String getRequiredProperty(String key)
throws IllegalStateException
null).
IllegalStateException - if the key cannot be resolvedgetRequiredProperty(String, Class)
<T> T getRequiredProperty(String key,
Class<T> targetType)
throws IllegalStateException
null).
IllegalStateException - if the given key cannot be resolvedString resolvePlaceholders(String text)
getProperty(java.lang.String). Unresolvable placeholders with
no default value are ignored and passed through unchanged.
text - the String to resolve
null)
IllegalArgumentException - if given text is nullresolveRequiredPlaceholders(java.lang.String),
SystemPropertyUtils.resolvePlaceholders(String)
String resolveRequiredPlaceholders(String text)
throws IllegalArgumentException
getProperty(java.lang.String). Unresolvable placeholders with
no default value will cause an IllegalArgumentException to be thrown.
null)
IllegalArgumentException - if given text is null
IllegalArgumentException - if any placeholders are unresolvableSystemPropertyUtils.resolvePlaceholders(String, boolean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||