LogbackRuntimeHints Class — spring-boot Architecture
Architecture documentation for the LogbackRuntimeHints class in LogbackRuntimeHints.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackRuntimeHints.java lines 37–73
class LogbackRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
if (!ClassUtils.isPresent("ch.qos.logback.classic.LoggerContext", classLoader)) {
return;
}
ReflectionHints reflection = hints.reflection();
registerHintsForLogbackLoggingSystemTypeChecks(reflection, classLoader);
registerHintsForBuiltInLogbackConverters(reflection);
registerHintsForSpringBootConverters(reflection);
}
private void registerHintsForLogbackLoggingSystemTypeChecks(ReflectionHints reflection,
@Nullable ClassLoader classLoader) {
reflection.registerType(LoggerContext.class);
reflection.registerTypeIfPresent(classLoader, "org.slf4j.bridge.SLF4JBridgeHandler", (typeHint) -> {
});
}
private void registerHintsForBuiltInLogbackConverters(ReflectionHints reflection) {
registerForPublicConstructorInvocation(reflection, DateTokenConverter.class, IntegerTokenConverter.class,
SyslogStartConverter.class);
}
private void registerHintsForSpringBootConverters(ReflectionHints reflection) {
registerForPublicConstructorInvocation(reflection, ColorConverter.class,
EnclosedInSquareBracketsConverter.class, ExtendedWhitespaceThrowableProxyConverter.class,
WhitespaceThrowableProxyConverter.class, CorrelationIdConverter.class);
}
private void registerForPublicConstructorInvocation(ReflectionHints reflection, Class<?>... classes) {
reflection.registerTypes(TypeReference.listOf(classes),
(hint) -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free