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

getEnvironment() — spring-boot Function Reference

Architecture documentation for the getEnvironment() function in ApplicationPidFileWriter.java from the spring-boot codebase.

Function java GradlePlugin RunTasks calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  40f47279_1301_7ce6_a5b6_e6b7caa3bff7["getEnvironment()"]
  e8e9435c_766f_0511_3d56_58301ecc0ec1["getValue()"]
  e8e9435c_766f_0511_3d56_58301ecc0ec1 -->|calls| 40f47279_1301_7ce6_a5b6_e6b7caa3bff7
  4baf3fc6_621e_dcfc_aa6f_e5b082e8d6d7["getEnvironment()"]
  40f47279_1301_7ce6_a5b6_e6b7caa3bff7 -->|calls| 4baf3fc6_621e_dcfc_aa6f_e5b082e8d6d7
  a663e0da_a590_0428_3ec7_5915632eae07["getApplicationContext()"]
  40f47279_1301_7ce6_a5b6_e6b7caa3bff7 -->|calls| a663e0da_a590_0428_3ec7_5915632eae07
  style 40f47279_1301_7ce6_a5b6_e6b7caa3bff7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/ApplicationPidFileWriter.java lines 225–236

		private @Nullable Environment getEnvironment(SpringApplicationEvent event) {
			if (event instanceof ApplicationEnvironmentPreparedEvent environmentPreparedEvent) {
				return environmentPreparedEvent.getEnvironment();
			}
			if (event instanceof ApplicationPreparedEvent preparedEvent) {
				return preparedEvent.getApplicationContext().getEnvironment();
			}
			if (event instanceof ApplicationReadyEvent readyEvent) {
				return readyEvent.getApplicationContext().getEnvironment();
			}
			return null;
		}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getEnvironment() do?
getEnvironment() is a function in the spring-boot codebase.
What does getEnvironment() call?
getEnvironment() calls 2 function(s): getApplicationContext, getEnvironment.
What calls getEnvironment()?
getEnvironment() is called by 1 function(s): getValue.

Analyze Your Own Codebase

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

Try Supermodel Free