NestedPlaceholderPart class

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:

  • keyParts would resolve #{env:dev.name}
  • defaultParts would resolve #{default.value}

The resolution process:

  1. Resolves keyParts to get the final key.
  2. Tries to resolve that key using resolveRecursively.
  3. If unresolved, tries defaultParts if provided.
  4. If still unresolved, delegates to PlaceholderPartResolutionContext.handleUnresolvablePlaceholder.

This allows for recursive resolution and fallback substitution, enabling powerful and composable placeholder configurations.

Inheritance

Constructors

NestedPlaceholderPart(String text, List<PlaceholderPart> keyParts, List<PlaceholderPart>? defaultParts)
A PlaceholderPart that represents a nested placeholder expression with optional fallback.

Properties

defaultParts List<PlaceholderPart>?
The optional parts that make up the default/fallback value of the placeholder.
final
hashCode int
The hash code for this object.
no setterinherited
keyParts List<PlaceholderPart>
The parts that make up the dynamic key of the placeholder.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(PlaceholderPartResolutionContext resolutionContext) String
Represents a segment or fragment of a placeholder expression.
override
resolveRecursively(PlaceholderPartResolutionContext resolutionContext, String key) String?
Recursively resolves the placeholder identified by key using the provided resolutionContext.
inherited
text() String
Returns the raw textual representation of this part.
inherited
toString() String
A string representation of this object.
inherited

Operators

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