Home / Class/ TestClassLoader Class — spring-boot Architecture

TestClassLoader Class — spring-boot Architecture

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

Entity Profile

Source Code

core/spring-boot/src/test/java/org/springframework/boot/io/ApplicationResourceLoaderTests.java lines 334–353

	static class TestClassLoader extends ClassLoader {

		private final UnaryOperator<String> mapper;

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

		@Override
		public URL getResource(String name) {
			return super.getResource(this.mapper.apply(name));
		}

		@Override
		public Enumeration<URL> getResources(String name) throws IOException {
			return super.getResources(this.mapper.apply(name));
		}

	}

Analyze Your Own Codebase

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

Try Supermodel Free