Home / Class/ CompiledMetadataReader Class — spring-boot Architecture

CompiledMetadataReader Class — spring-boot Architecture

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

Entity Profile

Relationship Graph

Source Code

configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/test/CompiledMetadataReader.java lines 32–58

public final class CompiledMetadataReader {

	private static final String METADATA_FILE = "META-INF/spring-configuration-metadata.json";

	private CompiledMetadataReader() {
	}

	public static ConfigurationMetadata getMetadata(Compiled compiled) {
		return getMetadata(compiled, METADATA_FILE);
	}

	public static ConfigurationMetadata getMetadata(Compiled compiled, String location) {
		InputStream inputStream = compiled.getClassLoader().getResourceAsStream(location);
		try {
			if (inputStream != null) {
				return new JsonMarshaller().read(inputStream);
			}
			else {
				return null;
			}
		}
		catch (Exception ex) {
			throw new RuntimeException("Failed to read metadata fom '%s'".formatted(location), ex);
		}
	}

}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free