resolveAll static method
String
resolveAll(
- Iterable<
PlaceholderPart> parts, - PlaceholderPartResolutionContext resolutionContext
Resolves and concatenates all parts
using the given resolutionContext
.
This utility method allows a list of Part
s to be resolved into a
single final string with all placeholders or text fragments merged.
Example
final result = Part.resolveAll(parts, context);
print(result); // "http://localhost:8080"
It internally uses resolve on each PlaceholderPart and builds the full result.
Implementation
static String resolveAll(Iterable<PlaceholderPart> parts, PlaceholderPartResolutionContext resolutionContext) {
StringBuilder sb = StringBuilder();
for (PlaceholderPart part in parts) {
sb.append(part.resolve(resolutionContext));
}
return sb.toString();
}