Home / Function/ readLayerIndex() — spring-boot Function Reference

readLayerIndex() — spring-boot Function Reference

Architecture documentation for the readLayerIndex() function in AbstractBootArchiveIntegrationTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  4411a1be_530d_c0d4_e4d4_669711600b98["readLayerIndex()"]
  1480e02e_7f37_b733_2059_24a17cfcd2ae["implicitLayers()"]
  1480e02e_7f37_b733_2059_24a17cfcd2ae -->|calls| 4411a1be_530d_c0d4_e4d4_669711600b98
  ac7f2c84_3074_d9f3_cf2a_3c3718897639["multiModuleImplicitLayers()"]
  ac7f2c84_3074_d9f3_cf2a_3c3718897639 -->|calls| 4411a1be_530d_c0d4_e4d4_669711600b98
  65ec8caa_353b_1f02_52f6_cd4484a86a76["customLayers()"]
  65ec8caa_353b_1f02_52f6_cd4484a86a76 -->|calls| 4411a1be_530d_c0d4_e4d4_669711600b98
  bfc328c2_9a96_d1f1_d259_8f62ad8057fe["multiModuleCustomLayers()"]
  bfc328c2_9a96_d1f1_d259_8f62ad8057fe -->|calls| 4411a1be_530d_c0d4_e4d4_669711600b98
  style 4411a1be_530d_c0d4_e4d4_669711600b98 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java lines 737–754

	private Map<String, List<String>> readLayerIndex(JarFile jarFile) throws IOException {
		Map<String, List<String>> index = new LinkedHashMap<>();
		ZipEntry indexEntry = jarFile.getEntry(this.indexPath + "layers.idx");
		try (BufferedReader reader = new BufferedReader(new InputStreamReader(jarFile.getInputStream(indexEntry)))) {
			String line = reader.readLine();
			String layer = null;
			while (line != null) {
				if (line.startsWith("- ")) {
					layer = line.substring(3, line.length() - 2);
				}
				else if (line.startsWith("  - ")) {
					index.computeIfAbsent(layer, (key) -> new ArrayList<>()).add(line.substring(5, line.length() - 1));
				}
				line = reader.readLine();
			}
			return index;
		}
	}

Domain

Subdomains

Frequently Asked Questions

What does readLayerIndex() do?
readLayerIndex() is a function in the spring-boot codebase.
What calls readLayerIndex()?
readLayerIndex() is called by 4 function(s): customLayers, implicitLayers, multiModuleCustomLayers, multiModuleImplicitLayers.

Analyze Your Own Codebase

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

Try Supermodel Free