Home / Class/ TestClassLoader Class — spring-boot Architecture

TestClassLoader Class — spring-boot Architecture

Architecture documentation for the TestClassLoader class in WebResourcesRuntimeHintsTests.java from the spring-boot codebase.

Entity Profile

Source Code

core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebResourcesRuntimeHintsTests.java lines 73–87

	private static class TestClassLoader extends ClassLoader {

		private final List<String> availableResources;

		TestClassLoader(List<String> availableResources) {
			super(Thread.currentThread().getContextClassLoader());
			this.availableResources = availableResources;
		}

		@Override
		public @Nullable URL getResource(String name) {
			return (this.availableResources.contains(name)) ? super.getResource("web/custom-resource.txt") : null;
		}

	}

Analyze Your Own Codebase

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

Try Supermodel Free