PlaceholderPartResolutionContext class

A resolution context for placeholder expressions, providing configuration, resolution logic, and tracking for visited placeholders.

This context is passed to PlaceholderParts during resolution, giving them access to:

It is a central piece of the placeholder resolution engine.

Implemented types

Constructors

PlaceholderPartResolutionContext(PlaceholderResolverFn resolver, String prefix, String suffix, bool ignoreUnresolvablePlaceholders, List<PlaceholderPart> parser(String), Log logger)
A resolution context for placeholder expressions, providing configuration, resolution logic, and tracking for visited placeholders.

Properties

hashCode int
The hash code for this object.
no setterinherited
ignoreUnresolvablePlaceholders bool
Whether to ignore unresolvable placeholders and leave them as-is.
final
logger → Log
Logger used for resolution tracing.
final
parser List<PlaceholderPart> Function(String)
A function that parses raw text into PlaceholderParts.
final
prefix String
The placeholder prefix (e.g. #{).
final
resolver PlaceholderResolverFn
The underlying resolver used to resolve individual placeholder values.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffix String
The placeholder suffix (e.g. }).
final
visitedPlaceholders Set<String>?
Set of placeholders that have already been visited (for circular reference detection).
getter/setter pair

Methods

flagPlaceholderAsVisited(String placeholder) → void
Marks the given placeholder as visited to detect circular references.
handleUnresolvablePlaceholder(String key, String text) String
Handles what to do when a placeholder cannot be resolved.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String text) List<PlaceholderPart>
Parses the given text into a list of PlaceholderParts using the context’s parser.
removePlaceholder(String placeholder) → void
Removes the given placeholder from the visited placeholders set.
resolvePlaceholder(String placeholderName) String?
Strategy interface for resolving placeholder values in configuration strings.
override
toPlaceholderText(String text) String
Reconstructs a placeholder expression from the text using the context’s prefix and suffix.
toString() String
A string representation of this object.
inherited

Operators

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