java.lang.Object
dev.orne.config.impl.VariableResolver
- All Implemented Interfaces:
ValueDecorator
@API(status=INTERNAL,
since="1.0")
public class VariableResolver
extends Object
implements ValueDecorator
StringSubstitutor based configuration property values variable
resolver.- Since:
- 1.0
- Version:
- 1.0, 2025-04
- Author:
- (w) Iker Hernaez
- See Also:
-
StringSubstitutor
-
Field Summary
Fields inherited from interface dev.orne.config.ValueDecorator
DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionVariableResolver(Config config) Creates a new instance base on the specified configuration.VariableResolver(org.apache.commons.text.StringSubstitutor substitutor) Creates a new instance using the specified string substitutor. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the resolved values cache.@Nullable StringDecorates the configuration property value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.orne.config.ValueDecorator
andThen, compose
-
Constructor Details
-
VariableResolver
Creates a new instance base on the specified configuration.- Parameters:
config- The configuration instance.
-
VariableResolver
public VariableResolver(org.apache.commons.text.StringSubstitutor substitutor) Creates a new instance using the specified string substitutor.- Parameters:
substitutor- The string substitutor to use.
-
-
Method Details
-
decorate
Decorates the configuration property value.- Specified by:
decoratein interfaceValueDecorator- Parameters:
value- The configuration property value.- Returns:
- The decorated configuration property value.
-
clearCache
public void clearCache()Clears the resolved values cache.
-