Home / Class/ AotContribution Class — spring-boot Architecture

AotContribution Class — spring-boot Architecture

Architecture documentation for the AotContribution class in StructuredLoggingJsonPropertiesBeanFactoryInitializationAotProcessor.java from the spring-boot codebase.

Entity Profile

Source Code

core/spring-boot/src/main/java/org/springframework/boot/logging/structured/StructuredLoggingJsonPropertiesBeanFactoryInitializationAotProcessor.java lines 67–95

	private static final class AotContribution implements BeanFactoryInitializationAotContribution {

		private final @Nullable ClassLoader classLoader;

		private final Set<Class<? extends StructuredLoggingJsonMembersCustomizer<?>>> customizers;

		private final @Nullable String stackTracePrinter;

		private AotContribution(@Nullable ClassLoader classLoader,
				Set<Class<? extends StructuredLoggingJsonMembersCustomizer<?>>> customizers,
				@Nullable String stackTracePrinter) {
			this.classLoader = classLoader;
			this.customizers = customizers;
			this.stackTracePrinter = stackTracePrinter;
		}

		@Override
		public void applyTo(GenerationContext generationContext,
				BeanFactoryInitializationCode beanFactoryInitializationCode) {
			ReflectionHints reflection = generationContext.getRuntimeHints().reflection();
			this.customizers.forEach((customizer) -> reflection.registerType(customizer,
					MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
			if (this.stackTracePrinter != null) {
				reflection.registerTypeIfPresent(this.classLoader, this.stackTracePrinter,
						MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS);
			}
		}

	}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free