public class DefaultPropertyPlaceholderResolver extends Object implements PropertyPlaceholderResolver, AutoCloseable
PropertyPlaceholderResolver.| Modifier and Type | Class and Description | 
|---|---|
| class  | DefaultPropertyPlaceholderResolver.PlaceholderSegmentA segment that represents one or more expressions
 that should be searched for in the environment. | 
| class  | DefaultPropertyPlaceholderResolver.RawSegmentA segment that represents static text. | 
| static interface  | DefaultPropertyPlaceholderResolver.SegmentA segment of placeholder resolution. | 
| Modifier and Type | Field and Description | 
|---|---|
| static String | PREFIXPrefix for placeholder in properties. | 
| static String | SUFFIXSuffix for placeholder in properties. | 
| Constructor and Description | 
|---|
| DefaultPropertyPlaceholderResolver(PropertyResolver environment,
                                  ConversionService conversionService) | 
| Modifier and Type | Method and Description | 
|---|---|
| List<DefaultPropertyPlaceholderResolver.Segment> | buildSegments(String str)Split a placeholder value into logic segments. | 
| void | close() | 
| String | getPrefix() | 
| protected <T> T | resolveExpression(String context,
                 String expression,
                 Class<T> type)Resolves a single expression. | 
| Optional<String> | resolvePlaceholders(String str)Resolve the placeholders and return an Optional String if it was possible to resolve them. | 
| <T> T | resolveRequiredPlaceholder(String str,
                          Class<T> type)Resolves the value of a single placeholder. | 
| String | resolveRequiredPlaceholders(String str)Resolve the placeholders and return an Optional String if it was possible to resolve them. | 
public static final String PREFIX
public static final String SUFFIX
public DefaultPropertyPlaceholderResolver(PropertyResolver environment, ConversionService conversionService)
environment - The property resolver for the environmentconversionService - The conversion servicepublic String getPrefix()
getPrefix in interface PropertyPlaceholderResolverpublic Optional<String> resolvePlaceholders(String str)
PropertyPlaceholderResolverresolvePlaceholders in interface PropertyPlaceholderResolverstr - The placeholder to resolveOptional.empty() if resolution was not possiblepublic String resolveRequiredPlaceholders(String str) throws ConfigurationException
PropertyPlaceholderResolverresolveRequiredPlaceholders in interface PropertyPlaceholderResolverstr - The placeholder to resolveOptional.empty() if resolution was not possibleConfigurationException - If the placeholders could not be resolvedpublic <T> T resolveRequiredPlaceholder(String str, Class<T> type) throws ConfigurationException
PropertyPlaceholderResolverresolveRequiredPlaceholder in interface PropertyPlaceholderResolverT - The type the value should be converted tostr - The string containing the placeholdertype - The class of the typeConfigurationException - If multiple placeholders are found or
 if the placeholder could not be converted to the requested typepublic List<DefaultPropertyPlaceholderResolver.Segment> buildSegments(String str)
str - The placeholder@Nullable protected <T> T resolveExpression(String context, String expression, Class<T> type)
T - The type the expression should be converted tocontext - The context of the expressionexpression - The expressiontype - The classpublic void close()
           throws Exception
close in interface AutoCloseableException