|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.springsource.util.common.PropertyPlaceholderResolver
public final class PropertyPlaceholderResolver
Utility class for resolving placeholders inside a Properties instance. These placeholders can refer to other
properties in the Properties instance. The place holders may also have a modifier in them
${com.springsource:modifier}
where everything after the colon is considered the modifier. This class does not interpret these modifiers but
rather delegates to a PropertyPlaceholderResolver.PlaceholderValueTransformer for processing.
Concurrent Semantics
| Nested Class Summary | |
|---|---|
static interface |
PropertyPlaceholderResolver.PlaceholderValueTransformer
An interface for property placeholder modifiers. |
| Field Summary | |
|---|---|
private static PropertyPlaceholderResolver.PlaceholderValueTransformer |
IDENTITY_TRANSFORMER
|
private static java.util.regex.Pattern |
PATTERN
|
| Constructor Summary | |
|---|---|
PropertyPlaceholderResolver()
|
|
| Method Summary | |
|---|---|
private static java.lang.String |
escapeBackslashes(java.lang.String string)
|
private java.lang.String |
formatPropertyCycleMessage(java.util.Stack<java.lang.String> visitState)
|
java.util.Properties |
resolve(java.util.Properties input)
Resolves all placeholders in the supplied Properties instance. |
java.util.Properties |
resolve(java.util.Properties input,
PropertyPlaceholderResolver.PlaceholderValueTransformer transformer)
Resolves all placeholders in the supplied Properties instance and transform any based on their modifiers. |
java.lang.String |
resolve(java.lang.String input,
java.util.Properties props)
Resolves all placeholders in the supplied string with values from a Properties instance. |
java.lang.String |
resolve(java.lang.String input,
java.util.Properties props,
PropertyPlaceholderResolver.PlaceholderValueTransformer transformer)
Resolves all placeholders in the supplied string with values from a Properties instance and transform any
based on their modifiers. |
private java.lang.String |
resolve(java.lang.String name,
java.util.Properties props,
PropertyPlaceholderResolver.PlaceholderValueTransformer transformer,
java.util.Stack<java.lang.String> visitState)
|
private java.lang.String |
resolveProperty(java.lang.String name,
java.util.Properties props,
PropertyPlaceholderResolver.PlaceholderValueTransformer transformer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.regex.Pattern PATTERN
private static final PropertyPlaceholderResolver.PlaceholderValueTransformer IDENTITY_TRANSFORMER
| Constructor Detail |
|---|
public PropertyPlaceholderResolver()
| Method Detail |
|---|
public java.util.Properties resolve(java.util.Properties input)
Properties instance.
input - the properties to resolve.
public java.util.Properties resolve(java.util.Properties input,
PropertyPlaceholderResolver.PlaceholderValueTransformer transformer)
Properties instance and transform any based on their modifiers.
input - the properties to resolve.transformer - a transformer for handling property modifiers
public java.lang.String resolve(java.lang.String input,
java.util.Properties props)
Properties instance.
input - the string to resolveprops - the properties to use for resolution
public java.lang.String resolve(java.lang.String input,
java.util.Properties props,
PropertyPlaceholderResolver.PlaceholderValueTransformer transformer)
Properties instance and transform any
based on their modifiers.
input - the string to resolveprops - the properties to use for resolutiontransformer - a transformer for handling property modifiers
private java.lang.String resolveProperty(java.lang.String name,
java.util.Properties props,
PropertyPlaceholderResolver.PlaceholderValueTransformer transformer)
private java.lang.String resolve(java.lang.String name,
java.util.Properties props,
PropertyPlaceholderResolver.PlaceholderValueTransformer transformer,
java.util.Stack<java.lang.String> visitState)
private static java.lang.String escapeBackslashes(java.lang.String string)
private java.lang.String formatPropertyCycleMessage(java.util.Stack<java.lang.String> visitState)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||