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

findSource() — spring-boot Function Reference

Architecture documentation for the findSource() function in ApplicationHome.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  5f24abdc_7147_316e_6d1f_a35f955ab257["findSource()"]
  59c65919_691b_b78c_56bc_a24bf1319909["ApplicationHome()"]
  59c65919_691b_b78c_56bc_a24bf1319909 -->|calls| 5f24abdc_7147_316e_6d1f_a35f955ab257
  83c51dba_3330_5435_08ae_c55eb58c393e["isUnitTest()"]
  5f24abdc_7147_316e_6d1f_a35f955ab257 -->|calls| 83c51dba_3330_5435_08ae_c55eb58c393e
  a0d822c6_d09f_a3c7_cf8f_1c38e1dff08b["getRootJarFile()"]
  5f24abdc_7147_316e_6d1f_a35f955ab257 -->|calls| a0d822c6_d09f_a3c7_cf8f_1c38e1dff08b
  style 5f24abdc_7147_316e_6d1f_a35f955ab257 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/system/ApplicationHome.java lines 93–107

	private @Nullable File findSource(@Nullable Class<?> sourceClass) {
		try {
			ProtectionDomain domain = (sourceClass != null) ? sourceClass.getProtectionDomain() : null;
			CodeSource codeSource = (domain != null) ? domain.getCodeSource() : null;
			URL location = (codeSource != null) ? codeSource.getLocation() : null;
			File source = (location != null) ? findSource(location) : null;
			if (source != null && source.exists() && !isUnitTest()) {
				return source.getAbsoluteFile();
			}
		}
		catch (Exception ex) {
			// Ignore
		}
		return null;
	}

Domain

Subdomains

Calls

  • getRootJarFile()
  • isUnitTest()

Called By

Frequently Asked Questions

What does findSource() do?
findSource() is a function in the spring-boot codebase.
What does findSource() call?
findSource() calls 2 function(s): getRootJarFile, isUnitTest.
What calls findSource()?
findSource() is called by 1 function(s): ApplicationHome.

Analyze Your Own Codebase

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

Try Supermodel Free