ConfigurablePropertyResolver class abstract interface

A specialized PropertyResolver that allows full control over property placeholder behavior and type conversion logic using a configurable ConfigurableConversionService.

This interface enables:

  • Custom placeholder syntax configuration (prefix, suffix, separator, escape).
  • Tolerance or strictness for unresolvable nested placeholders.
  • Custom Converter registration.
  • Required property validation.

🔁 Example:

final resolver = MyPropertyResolver();
resolver.setPlaceholderPrefix('#{');
resolver.setPlaceholderSuffix('}');
resolver.setValueSeparator(':');
resolver.setEscapeCharacter(r'\');
resolver.setIgnoreUnresolvableNestedPlaceholders(false);

resolver.getConversionService().addConverter(StringToDurationConverter());

This is intended for internal use by Environment implementations and advanced property injection infrastructure.

Inheritance
Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

containsProperty(String key) → bool
Returns whether the given property key is defined.
inherited
getConversionService() → ConfigurableConversionService
Returns the ConfigurableConversionService used to perform type conversions.
getProperty(String key, [String? defaultValue]) → String?
Retrieves the value for the given property key, or null if not found.
inherited
getPropertyAs<T>(String key, Class<T> targetType, [T? defaultValue]) → T?
Retrieves and converts the value of key to the desired type T.
inherited
getRequiredProperty(String key) → String
Returns the property value for key, or throws IllegalStateException if the property is not defined.
inherited
getRequiredPropertyAs<T>(String key, Class<T> targetType) → T
Retrieves and converts the property key to type T, or throws IllegalStateException if missing or invalid.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolvePlaceholders(String text) → String
Resolves #{...} placeholders in the input text using available properties.
inherited
resolveRequiredPlaceholders(String text) → String
Resolves #{...} placeholders in the input text using available properties.
inherited
setConversionService(ConfigurableConversionService conversionService) → void
Replaces the underlying ConfigurableConversionService used for type conversions.
setEscapeCharacter(Character? escapeCharacter) → void
Sets the escape character used to ignore placeholder prefix and separator.
setIgnoreUnresolvableNestedPlaceholders(bool ignoreUnresolvableNestedPlaceholders) → void
Enables or disables ignoring unresolvable nested placeholders.
setPlaceholderPrefix(String placeholderPrefix) → void
Sets the prefix that identifies a placeholder in property values.
setPlaceholderSuffix(String placeholderSuffix) → void
Sets the suffix that identifies the end of a placeholder in property values.
setRequiredProperties(List<String> requiredProperties) → void
Sets the list of property names that are required to be present and non-null.
setValueSeparator(String? valueSeparator) → void
Sets the separator for default values within placeholders.
suggestions(String key) → List<String>
Returns a list of suggestions for the given key.
inherited
toString() → String
A string representation of this object.
inherited
validateRequiredProperties() → void
Validates that all required properties are present and non-null.

Operators

operator ==(Object other) → bool
The equality operator.
inherited