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

getOrElseThrow() — spring-boot Function Reference

Architecture documentation for the getOrElseThrow() function in DefaultBootstrapContext.java from the spring-boot codebase.

Function java GradlePlugin RunTasks calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  c72eb534_51b4_1003_ca6f_0c7542774c41["getOrElseThrow()"]
  87f0b21f_3955_8dcc_cc55_9c6321893f96["get()"]
  87f0b21f_3955_8dcc_cc55_9c6321893f96 -->|calls| c72eb534_51b4_1003_ca6f_0c7542774c41
  87f0b21f_3955_8dcc_cc55_9c6321893f96["get()"]
  c72eb534_51b4_1003_ca6f_0c7542774c41 -->|calls| 87f0b21f_3955_8dcc_cc55_9c6321893f96
  e48b0014_eeea_f2a4_363f_d6101ab60325["getInstance()"]
  c72eb534_51b4_1003_ca6f_0c7542774c41 -->|calls| e48b0014_eeea_f2a4_363f_d6101ab60325
  style c72eb534_51b4_1003_ca6f_0c7542774c41 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/bootstrap/DefaultBootstrapContext.java lines 107–117

	@Override
	public <T, X extends Throwable> @Nullable T getOrElseThrow(Class<T> type, Supplier<? extends X> exceptionSupplier)
			throws X {
		synchronized (this.instanceSuppliers) {
			InstanceSupplier<?> instanceSupplier = this.instanceSuppliers.get(type);
			if (instanceSupplier == null) {
				throw exceptionSupplier.get();
			}
			return getInstance(type, instanceSupplier);
		}
	}

Domain

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free