addBean() — spring-boot Function Reference
Architecture documentation for the addBean() function in ApplicationConversionService.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD b0d55b27_9aaf_5809_0dd5_405a839e2f9e["addBean()"] 79c46002_d35a_0dd2_a98d_10bc18fd39cf["addBeans()"] 79c46002_d35a_0dd2_a98d_10bc18fd39cf -->|calls| b0d55b27_9aaf_5809_0dd5_405a839e2f9e fd707022_c6e9_5685_fc15_4599d4a06eef["addBeanWithType()"] fd707022_c6e9_5685_fc15_4599d4a06eef -->|calls| b0d55b27_9aaf_5809_0dd5_405a839e2f9e fd707022_c6e9_5685_fc15_4599d4a06eef["addBeanWithType()"] b0d55b27_9aaf_5809_0dd5_405a839e2f9e -->|calls| fd707022_c6e9_5685_fc15_4599d4a06eef cba1a510_b294_cced_2bbe_9861b2c09a45["addConverter()"] b0d55b27_9aaf_5809_0dd5_405a839e2f9e -->|calls| cba1a510_b294_cced_2bbe_9861b2c09a45 8e19b7d3_3460_3dd7_ed3f_95aab02209ad["PrinterBeanAdapter()"] b0d55b27_9aaf_5809_0dd5_405a839e2f9e -->|calls| 8e19b7d3_3460_3dd7_ed3f_95aab02209ad 50fec73e_105f_d9b4_dcbc_d1063bdc756a["ParserBeanAdapter()"] b0d55b27_9aaf_5809_0dd5_405a839e2f9e -->|calls| 50fec73e_105f_d9b4_dcbc_d1063bdc756a style b0d55b27_9aaf_5809_0dd5_405a839e2f9e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/convert/ApplicationConversionService.java lines 350–380
static void addBean(FormatterRegistry registry, Object bean, @Nullable ResolvableType beanType) {
if (bean instanceof GenericConverter converterBean) {
addBean(registry, converterBean, beanType, GenericConverter.class, registry::addConverter, (Runnable) null);
}
else if (bean instanceof Converter<?, ?> converterBean) {
Assert.state(beanType != null, "beanType is missing");
addBeanWithType(registry, converterBean, beanType, Converter.class, registry::addConverter,
ConverterBeanAdapter::new);
}
else if (bean instanceof ConverterFactory<?, ?> converterBean) {
Assert.state(beanType != null, "beanType is missing");
addBeanWithType(registry, converterBean, beanType, ConverterFactory.class, registry::addConverterFactory,
ConverterFactoryBeanAdapter::new);
}
else if (bean instanceof Formatter<?> formatterBean) {
addBean(registry, formatterBean, beanType, Formatter.class, registry::addFormatter, () -> {
Assert.state(beanType != null, "beanType is missing");
registry.addConverter(new PrinterBeanAdapter(formatterBean, beanType));
registry.addConverter(new ParserBeanAdapter(formatterBean, beanType));
});
}
else if (bean instanceof Printer<?> printerBean) {
Assert.state(beanType != null, "beanType is missing");
addBeanWithType(registry, printerBean, beanType, Printer.class, registry::addPrinter,
PrinterBeanAdapter::new);
}
else if (bean instanceof Parser<?> parserBean) {
Assert.state(beanType != null, "beanType is missing");
addBeanWithType(registry, parserBean, beanType, Parser.class, registry::addParser, ParserBeanAdapter::new);
}
}
Domain
Subdomains
Calls
- ParserBeanAdapter()
- PrinterBeanAdapter()
- addBeanWithType()
- addConverter()
Called By
Source
Frequently Asked Questions
What does addBean() do?
addBean() is a function in the spring-boot codebase.
What does addBean() call?
addBean() calls 4 function(s): ParserBeanAdapter, PrinterBeanAdapter, addBeanWithType, addConverter.
What calls addBean()?
addBean() is called by 2 function(s): addBeanWithType, addBeans.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free