getConstructors() — spring-boot Function Reference
Architecture documentation for the getConstructors() function in DefaultBindConstructorProvider.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 513d0372_e091_f918_32b7_40ca2cbe89a1["getConstructors()"] ac8770f0_3b93_a424_c067_4a5dda410340["getBindConstructor()"] ac8770f0_3b93_a424_c067_4a5dda410340 -->|calls| 513d0372_e091_f918_32b7_40ca2cbe89a1 8ca1c20e_1a02_1fc4_6f97_83c9b43ff9ee["isAutowiredPresent()"] 513d0372_e091_f918_32b7_40ca2cbe89a1 -->|calls| 8ca1c20e_1a02_1fc4_6f97_83c9b43ff9ee 0c300663_0433_4a4a_4a39_001a282bad13["getCandidateConstructors()"] 513d0372_e091_f918_32b7_40ca2cbe89a1 -->|calls| 0c300663_0433_4a4a_4a39_001a282bad13 116bf70e_8fdd_a9c9_7aa3_9998d7be5198["getAnnotations()"] 513d0372_e091_f918_32b7_40ca2cbe89a1 -->|calls| 116bf70e_8fdd_a9c9_7aa3_9998d7be5198 e9f5c6a2_6db4_4f03_9c2f_a5b320b1b2c2["getConstructorBindingAnnotated()"] 513d0372_e091_f918_32b7_40ca2cbe89a1 -->|calls| e9f5c6a2_6db4_4f03_9c2f_a5b320b1b2c2 d5efd1de_0682_67da_56f5_65e9ff101ca2["deduceBindConstructor()"] 513d0372_e091_f918_32b7_40ca2cbe89a1 -->|calls| d5efd1de_0682_67da_56f5_65e9ff101ca2 3687e326_1e90_f3f8_368e_d7c9d5bf569e["isKotlinType()"] 513d0372_e091_f918_32b7_40ca2cbe89a1 -->|calls| 3687e326_1e90_f3f8_368e_d7c9d5bf569e 263243c0_3174_108a_4b0b_99b0c8cf2d3b["deduceKotlinBindConstructor()"] 513d0372_e091_f918_32b7_40ca2cbe89a1 -->|calls| 263243c0_3174_108a_4b0b_99b0c8cf2d3b a60fc277_099a_aa48_67cb_97b007f559fb["Constructors()"] 513d0372_e091_f918_32b7_40ca2cbe89a1 -->|calls| a60fc277_099a_aa48_67cb_97b007f559fb style 513d0372_e091_f918_32b7_40ca2cbe89a1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/DefaultBindConstructorProvider.java lines 100–123
static Constructors getConstructors(@Nullable Class<?> type, boolean isNestedConstructorBinding) {
if (type == null) {
return NONE;
}
boolean hasAutowiredConstructor = isAutowiredPresent(type);
Constructor<?>[] candidates = getCandidateConstructors(type);
MergedAnnotations[] candidateAnnotations = getAnnotations(candidates);
boolean deducedBindConstructor = false;
boolean immutableType = type.isRecord();
Constructor<?> bind = getConstructorBindingAnnotated(type, candidates, candidateAnnotations);
if (bind == null && !hasAutowiredConstructor) {
bind = deduceBindConstructor(type, candidates);
deducedBindConstructor = bind != null;
}
if (bind == null && !hasAutowiredConstructor && isKotlinType(type)) {
bind = deduceKotlinBindConstructor(type);
deducedBindConstructor = bind != null;
}
if (bind != null || isNestedConstructorBinding) {
Assert.state(!hasAutowiredConstructor,
() -> type.getName() + " declares @ConstructorBinding and @Autowired constructor");
}
return new Constructors(hasAutowiredConstructor, bind, deducedBindConstructor, immutableType);
}
Domain
Subdomains
Calls
- Constructors()
- deduceBindConstructor()
- deduceKotlinBindConstructor()
- getAnnotations()
- getCandidateConstructors()
- getConstructorBindingAnnotated()
- isAutowiredPresent()
- isKotlinType()
Called By
Source
Frequently Asked Questions
What does getConstructors() do?
getConstructors() is a function in the spring-boot codebase.
What does getConstructors() call?
getConstructors() calls 8 function(s): Constructors, deduceBindConstructor, deduceKotlinBindConstructor, getAnnotations, getCandidateConstructors, getConstructorBindingAnnotated, isAutowiredPresent, isKotlinType.
What calls getConstructors()?
getConstructors() is called by 1 function(s): getBindConstructor.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free