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

create() — spring-boot Function Reference

Architecture documentation for the create() function in ExportedImageTar.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  8961244b_38b5_6707_a9a9_2a8cc9e8a67f["create()"]
  84f4e8df_832d_6145_c21f_6ca2d8b282e2["ExportedImageTar()"]
  84f4e8df_832d_6145_c21f_6ca2d8b282e2 -->|calls| 8961244b_38b5_6707_a9a9_2a8cc9e8a67f
  8d709dfe_a2af_b53b_88aa_92785c0109e7["openTar()"]
  8961244b_38b5_6707_a9a9_2a8cc9e8a67f -->|calls| 8d709dfe_a2af_b53b_88aa_92785c0109e7
  d59d57fe_e90e_fdc9_79e6_7e82665fba5c["equals()"]
  8961244b_38b5_6707_a9a9_2a8cc9e8a67f -->|calls| d59d57fe_e90e_fdc9_79e6_7e82665fba5c
  b3171812_ab1f_87c4_a83a_2a91e929e461["getName()"]
  8961244b_38b5_6707_a9a9_2a8cc9e8a67f -->|calls| b3171812_ab1f_87c4_a83a_2a91e929e461
  858ab411_02e3_9ad7_2e13_40c12d223aea["IndexLayerArchiveFactory()"]
  8961244b_38b5_6707_a9a9_2a8cc9e8a67f -->|calls| 858ab411_02e3_9ad7_2e13_40c12d223aea
  463be4f8_9511_d58e_9e8c_4de206335f8e["ManifestLayerArchiveFactory()"]
  8961244b_38b5_6707_a9a9_2a8cc9e8a67f -->|calls| 463be4f8_9511_d58e_9e8c_4de206335f8e
  241380c0_d8a2_4c77_91e0_4fc197c4e046["of()"]
  8961244b_38b5_6707_a9a9_2a8cc9e8a67f -->|calls| 241380c0_d8a2_4c77_91e0_4fc197c4e046
  style 8961244b_38b5_6707_a9a9_2a8cc9e8a67f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ExportedImageTar.java lines 115–139

		static LayerArchiveFactory create(ImageReference reference, Path tarFile) throws IOException {
			try (TarArchiveInputStream tar = openTar(tarFile)) {
				ImageArchiveIndex index = null;
				ImageArchiveManifest manifest = null;
				TarArchiveEntry entry = tar.getNextEntry();
				while (entry != null) {
					if ("index.json".equals(entry.getName())) {
						index = ImageArchiveIndex.of(tar);
						break;
					}
					if ("manifest.json".equals(entry.getName())) {
						manifest = ImageArchiveManifest.of(tar);
					}
					entry = tar.getNextEntry();
				}
				Assert.state(index != null || manifest != null,
						() -> "Exported image '%s' does not contain 'index.json' or 'manifest.json'"
							.formatted(reference));
				if (index != null) {
					return new IndexLayerArchiveFactory(tarFile, index);
				}
				Assert.state(manifest != null, "'manifest' must not be null");
				return new ManifestLayerArchiveFactory(manifest);
			}
		}

Subdomains

Called By

  • ExportedImageTar()

Frequently Asked Questions

What does create() do?
create() is a function in the spring-boot codebase.
What does create() call?
create() calls 6 function(s): IndexLayerArchiveFactory, ManifestLayerArchiveFactory, equals, getName, of, openTar.
What calls create()?
create() is called by 1 function(s): ExportedImageTar.

Analyze Your Own Codebase

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

Try Supermodel Free