getInstance() — spring-boot Function Reference
Architecture documentation for the getInstance() function in DefaultBootstrapContext.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD e48b0014_eeea_f2a4_363f_d6101ab60325["getInstance()"] 5cf57d2e_c9b3_99f8_df05_9512e842655a["deduceMainApplicationClass()"] 5cf57d2e_c9b3_99f8_df05_9512e842655a -->|calls| e48b0014_eeea_f2a4_363f_d6101ab60325 805663b4_fb92_a78c_765e_bf1a36785cc4["getOrElseSupply()"] 805663b4_fb92_a78c_765e_bf1a36785cc4 -->|calls| e48b0014_eeea_f2a4_363f_d6101ab60325 c72eb534_51b4_1003_ca6f_0c7542774c41["getOrElseThrow()"] c72eb534_51b4_1003_ca6f_0c7542774c41 -->|calls| e48b0014_eeea_f2a4_363f_d6101ab60325 cdb275e5_fc0e_effe_6b06_a35014d4f328["aotContributionRegistersActiveProfiles()"] cdb275e5_fc0e_effe_6b06_a35014d4f328 -->|calls| e48b0014_eeea_f2a4_363f_d6101ab60325 87f0b21f_3955_8dcc_cc55_9c6321893f96["get()"] e48b0014_eeea_f2a4_363f_d6101ab60325 -->|calls| 87f0b21f_3955_8dcc_cc55_9c6321893f96 style e48b0014_eeea_f2a4_363f_d6101ab60325 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/bootstrap/DefaultBootstrapContext.java lines 119–132
@SuppressWarnings("unchecked")
private <T> @Nullable T getInstance(Class<T> type, InstanceSupplier<?> instanceSupplier) {
T instance = (T) this.instances.get(type);
if (instance == null) {
instance = (T) instanceSupplier.get(this);
if (instance == null) {
return null;
}
if (instanceSupplier.getScope() == Scope.SINGLETON) {
this.instances.put(type, instance);
}
}
return instance;
}
Domain
Subdomains
Calls
Called By
- aotContributionRegistersActiveProfiles()
- deduceMainApplicationClass()
- getOrElseSupply()
- getOrElseThrow()
Source
Frequently Asked Questions
What does getInstance() do?
getInstance() is a function in the spring-boot codebase.
What does getInstance() call?
getInstance() calls 1 function(s): get.
What calls getInstance()?
getInstance() is called by 4 function(s): aotContributionRegistersActiveProfiles, deduceMainApplicationClass, getOrElseSupply, getOrElseThrow.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free