NestedPlaceholderPart constructor
NestedPlaceholderPart(
- String text,
- List<
PlaceholderPart> keyParts, - List<
PlaceholderPart> ? defaultParts
A PlaceholderPart that represents a nested placeholder expression with optional fallback.
This is used to represent placeholders whose keys or fallbacks themselves contain inner placeholder expressions, such as:
#{#{env:dev.name}:#{default.value}}
In this example:
keyPartswould resolve#{env:dev.name}defaultPartswould resolve#{default.value}
The resolution process:
- Resolves
keyPartsto get the final key. - Tries to resolve that key using resolveRecursively.
- If unresolved, tries
defaultPartsif provided. - If still unresolved, delegates to PlaceholderPartResolutionContext.handleUnresolvablePlaceholder.
This allows for recursive resolution and fallback substitution, enabling powerful and composable placeholder configurations.
Constructs a new NestedPlaceholderPart with the given text,
keyParts, and optional defaultParts.
Implementation
NestedPlaceholderPart(super.text, this.keyParts, this.defaultParts);