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

toInstance() — spring-boot Function Reference

Architecture documentation for the toInstance() function in PropertyMapper.java from the spring-boot codebase.

Function java GradlePlugin DslExtensions calls 3 called by 1

Entity Profile

Dependency Diagram

graph TD
  5f0b3b16_fe2e_34e4_260a_7108b5e06895["toInstance()"]
  46b231ad_b8ed_c491_0ed4_93d497cfa952["toInstance()"]
  46b231ad_b8ed_c491_0ed4_93d497cfa952 -->|calls| 5f0b3b16_fe2e_34e4_260a_7108b5e06895
  46b231ad_b8ed_c491_0ed4_93d497cfa952["toInstance()"]
  5f0b3b16_fe2e_34e4_260a_7108b5e06895 -->|calls| 46b231ad_b8ed_c491_0ed4_93d497cfa952
  102bb956_97ad_f89b_f753_8989dd091d8a["getValue()"]
  5f0b3b16_fe2e_34e4_260a_7108b5e06895 -->|calls| 102bb956_97ad_f89b_f753_8989dd091d8a
  f67b38c7_8777_f860_52fa_fcd5009a2413["test()"]
  5f0b3b16_fe2e_34e4_260a_7108b5e06895 -->|calls| f67b38c7_8777_f860_52fa_fcd5009a2413
  style 5f0b3b16_fe2e_34e4_260a_7108b5e06895 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertyMapper.java lines 469–476

			public <R> R toInstance(Factory<? super T, ? extends R> factory) {
				Assert.notNull(factory, "'factory' must not be null");
				T value = getValue();
				if (value == null || test(value)) {
					return factory.create(value);
				}
				throw new NoSuchElementException("No value present");
			}

Domain

Subdomains

Called By

Frequently Asked Questions

What does toInstance() do?
toInstance() is a function in the spring-boot codebase.
What does toInstance() call?
toInstance() calls 3 function(s): getValue, test, toInstance.
What calls toInstance()?
toInstance() is called by 1 function(s): toInstance.

Analyze Your Own Codebase

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

Try Supermodel Free