Home / Class/ TestApplicationListener Class — spring-boot Architecture

TestApplicationListener Class — spring-boot Architecture

Architecture documentation for the TestApplicationListener class in SpringApplicationTests.java from the spring-boot codebase.

Entity Profile

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java lines 2025–2041

	static class TestApplicationListener implements ApplicationListener<ApplicationEvent> {

		private final MultiValueMap<Class<?>, ApplicationEvent> events = new LinkedMultiValueMap<>();

		@Override
		public void onApplicationEvent(ApplicationEvent event) {
			this.events.add(event.getClass(), event);
		}

		@SuppressWarnings("unchecked")
		<E extends ApplicationEvent> E getEvent(Class<E> type) {
			List<ApplicationEvent> events = this.events.get(type);
			assertThat(events).isNotNull();
			return (E) events.get(0);
		}

	}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free