Home / Class/ TestEventListener Class — spring-boot Architecture

TestEventListener Class — spring-boot Architecture

Architecture documentation for the TestEventListener 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 1544–1566

	static class TestEventListener<E extends ApplicationEvent> implements SmartApplicationListener {

		private final Class<E> eventType;

		private final AtomicReference<E> reference;

		TestEventListener(Class<E> eventType, AtomicReference<E> reference) {
			this.eventType = eventType;
			this.reference = reference;
		}

		@Override
		public boolean supportsEventType(Class<? extends ApplicationEvent> eventType) {
			return this.eventType.isAssignableFrom(eventType);
		}

		@Override
		@SuppressWarnings("unchecked")
		public void onApplicationEvent(ApplicationEvent event) {
			this.reference.set((E) event);
		}

	}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free