Interface PropertyPlaceholder.PlaceholderResolver
-
- Enclosing class:
- PropertyPlaceholder
public static interface PropertyPlaceholder.PlaceholderResolverStrategy interface used to resolve replacement values for placeholders contained in Strings.- See Also:
PropertyPlaceholder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<String>resolvePlaceholder(String placeholderName)Resolves the supplied placeholder name into the replacement value.booleanshouldIgnoreMissing(String placeholderName)booleanshouldRemoveMissingPlaceholder(String placeholderName)Allows for special handling for ignored missing placeholders that may be resolved elsewhere.
-
-
-
Method Detail
-
resolvePlaceholder
Optional<String> resolvePlaceholder(String placeholderName)
Resolves the supplied placeholder name into the replacement value.- Parameters:
placeholderName- the name of the placeholder to resolve.- Returns:
- the replacement value or
nullif no replacement is to be made.
-
shouldIgnoreMissing
boolean shouldIgnoreMissing(String placeholderName)
-
shouldRemoveMissingPlaceholder
boolean shouldRemoveMissingPlaceholder(String placeholderName)
Allows for special handling for ignored missing placeholders that may be resolved elsewhere.- Parameters:
placeholderName- the name of the placeholder to resolve.- Returns:
- true if the placeholder should be replaced with a empty string
-
-