formatTo() — spring-boot Function Reference
Architecture documentation for the formatTo() function in CorrelationIdFormatter.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 36f5eaf8_bc90_5fba_a86c_3d292ed42d16["formatTo()"] eee34fbd_ca1c_e4d8_61ad_2eb2bdf0e869["format()"] eee34fbd_ca1c_e4d8_61ad_2eb2bdf0e869 -->|calls| 36f5eaf8_bc90_5fba_a86c_3d292ed42d16 202567f6_1116_26de_ba9d_82bd5ce40a78["format()"] 202567f6_1116_26de_ba9d_82bd5ce40a78 -->|calls| 36f5eaf8_bc90_5fba_a86c_3d292ed42d16 587c542e_7cb2_ba19_4616_63dcf6ae6584["resolve()"] 36f5eaf8_bc90_5fba_a86c_3d292ed42d16 -->|calls| 587c542e_7cb2_ba19_4616_63dcf6ae6584 style 36f5eaf8_bc90_5fba_a86c_3d292ed42d16 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/logging/CorrelationIdFormatter.java lines 101–121
public void formatTo(UnaryOperator<@Nullable String> resolver, Appendable appendable) {
Predicate<Part> canResolve = (part) -> StringUtils.hasLength(resolver.apply(part.name()));
try {
if (this.parts.stream().anyMatch(canResolve)) {
appendable.append('[');
for (Iterator<Part> iterator = this.parts.iterator(); iterator.hasNext();) {
appendable.append(iterator.next().resolve(resolver));
if (iterator.hasNext()) {
appendable.append('-');
}
}
appendable.append("] ");
}
else {
appendable.append(this.blank);
}
}
catch (IOException ex) {
throw new UncheckedIOException(ex);
}
}
Domain
Subdomains
Calls
- resolve()
Called By
- format()
- format()
Source
Frequently Asked Questions
What does formatTo() do?
formatTo() is a function in the spring-boot codebase.
What does formatTo() call?
formatTo() calls 1 function(s): resolve.
What calls formatTo()?
formatTo() is called by 2 function(s): format, format.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free