bind() — spring-boot Function Reference
Architecture documentation for the bind() function in ValueObjectBinder.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 162f4467_dcd4_9555_aafe_79bd463f235b["bind()"] 00f41cf1_0484_bd76_f3b4_98b112e8fa76["bind()"] 00f41cf1_0484_bd76_f3b4_98b112e8fa76 -->|calls| 162f4467_dcd4_9555_aafe_79bd463f235b 00f41cf1_0484_bd76_f3b4_98b112e8fa76["bind()"] 162f4467_dcd4_9555_aafe_79bd463f235b -->|calls| 00f41cf1_0484_bd76_f3b4_98b112e8fa76 9864967b_37d9_0634_dbcd_5f0500b8eb9b["getType()"] 162f4467_dcd4_9555_aafe_79bd463f235b -->|calls| 9864967b_37d9_0634_dbcd_5f0500b8eb9b 46b98d48_2b64_2351_c50d_2fa01b9964c8["getDefaultValue()"] 162f4467_dcd4_9555_aafe_79bd463f235b -->|calls| 46b98d48_2b64_2351_c50d_2fa01b9964c8 7ed947bf_22a1_2781_a2ae_759aa1907445["add()"] 162f4467_dcd4_9555_aafe_79bd463f235b -->|calls| 7ed947bf_22a1_2781_a2ae_759aa1907445 8149af72_1f34_9294_b533_45d202fd835a["instantiate()"] 162f4467_dcd4_9555_aafe_79bd463f235b -->|calls| 8149af72_1f34_9294_b533_45d202fd835a 2deedcad_1cf4_90a6_1f67_0525449d26f5["getConstructorParameters()"] 162f4467_dcd4_9555_aafe_79bd463f235b -->|calls| 2deedcad_1cf4_90a6_1f67_0525449d26f5 a361aa8b_5b77_ab5b_7655_6e15818bda62["get()"] 162f4467_dcd4_9555_aafe_79bd463f235b -->|calls| a361aa8b_5b77_ab5b_7655_6e15818bda62 style 162f4467_dcd4_9555_aafe_79bd463f235b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/ValueObjectBinder.java lines 76–98
@Override
public <T> @Nullable T bind(ConfigurationPropertyName name, Bindable<T> target, Binder.Context context,
DataObjectPropertyBinder propertyBinder) {
ValueObject<T> valueObject = ValueObject.get(target, context, this.constructorProvider, Discoverer.LENIENT);
if (valueObject == null) {
return null;
}
Class<?> targetType = target.getType().resolve();
Assert.state(targetType != null, "'targetType' must not be null");
context.pushConstructorBoundTypes(targetType);
List<ConstructorParameter> parameters = valueObject.getConstructorParameters();
List<@Nullable Object> args = new ArrayList<>(parameters.size());
boolean bound = false;
for (ConstructorParameter parameter : parameters) {
Object arg = parameter.bind(propertyBinder);
bound = bound || arg != null;
arg = (arg != null) ? arg : getDefaultValue(context, parameter);
args.add(arg);
}
context.clearConfigurationProperty();
context.popConstructorBoundTypes();
return bound ? valueObject.instantiate(args) : null;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does bind() do?
bind() is a function in the spring-boot codebase.
What does bind() call?
bind() calls 7 function(s): add, bind, get, getConstructorParameters, getDefaultValue, getType, instantiate.
What calls bind()?
bind() is called by 1 function(s): bind.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free