public class PropertyResolverAdapter extends Object implements org.springframework.core.env.PropertyResolver
PropertyResolver
to a Spring PropertyResolver
.Constructor and Description |
---|
PropertyResolverAdapter(PropertyResolver propertyResolver,
PropertyPlaceholderResolver placeholderResolver)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsProperty(String key) |
String |
getProperty(String key) |
<T> T |
getProperty(String key,
Class<T> targetType) |
<T> T |
getProperty(String key,
Class<T> targetType,
T defaultValue) |
String |
getProperty(String key,
String defaultValue) |
<T> Class<T> |
getPropertyAsClass(String key,
Class<T> targetType)
Deprecated.
|
PropertyResolver |
getPropertyResolver() |
String |
getRequiredProperty(String key) |
<T> T |
getRequiredProperty(String key,
Class<T> targetType) |
String |
resolvePlaceholders(String text) |
String |
resolveRequiredPlaceholders(String text) |
public PropertyResolverAdapter(PropertyResolver propertyResolver, PropertyPlaceholderResolver placeholderResolver)
propertyResolver
- The property resolverplaceholderResolver
- The property placeholder resolverpublic PropertyResolver getPropertyResolver()
public boolean containsProperty(String key)
containsProperty
in interface org.springframework.core.env.PropertyResolver
public String getProperty(String key)
getProperty
in interface org.springframework.core.env.PropertyResolver
public String getProperty(String key, String defaultValue)
getProperty
in interface org.springframework.core.env.PropertyResolver
public <T> T getProperty(String key, Class<T> targetType)
getProperty
in interface org.springframework.core.env.PropertyResolver
public <T> T getProperty(String key, Class<T> targetType, T defaultValue)
getProperty
in interface org.springframework.core.env.PropertyResolver
@Deprecated public <T> Class<T> getPropertyAsClass(String key, Class<T> targetType)
getPropertyAsClass
in interface org.springframework.core.env.PropertyResolver
T
- The class typekey
- The property keytargetType
- The classpublic String getRequiredProperty(String key) throws IllegalStateException
getRequiredProperty
in interface org.springframework.core.env.PropertyResolver
IllegalStateException
public <T> T getRequiredProperty(String key, Class<T> targetType) throws IllegalStateException
getRequiredProperty
in interface org.springframework.core.env.PropertyResolver
IllegalStateException
public String resolvePlaceholders(String text)
resolvePlaceholders
in interface org.springframework.core.env.PropertyResolver
public String resolveRequiredPlaceholders(String text) throws IllegalArgumentException
resolveRequiredPlaceholders
in interface org.springframework.core.env.PropertyResolver
IllegalArgumentException