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