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

getDefaultValueFromAnnotation() — spring-boot Function Reference

Architecture documentation for the getDefaultValueFromAnnotation() function in ParameterPropertyDescriptor.java from the spring-boot codebase.

Function java GradlePlugin RunTasks calls 3 called by 1

Entity Profile

Dependency Diagram

graph TD
  64ca8a6b_19ea_0d1c_4d95_50301aca00b0["getDefaultValueFromAnnotation()"]
  d3430cf3_70fd_eed0_1d6c_302c402cf0c9["resolveDefaultValue()"]
  d3430cf3_70fd_eed0_1d6c_302c402cf0c9 -->|calls| 64ca8a6b_19ea_0d1c_4d95_50301aca00b0
  64d20eaa_8d8a_5329_076d_f677b960ce1f["getDefaultValue()"]
  64ca8a6b_19ea_0d1c_4d95_50301aca00b0 -->|calls| 64d20eaa_8d8a_5329_076d_f677b960ce1f
  96700505_10c3_4e23_2baa_9d4ac264ab0e["determineSpecificType()"]
  64ca8a6b_19ea_0d1c_4d95_50301aca00b0 -->|calls| 96700505_10c3_4e23_2baa_9d4ac264ab0e
  b9c8a111_a361_88ff_a5fb_c46d25199dfd["coerceValue()"]
  64ca8a6b_19ea_0d1c_4d95_50301aca00b0 -->|calls| b9c8a111_a361_88ff_a5fb_c46d25199dfd
  style 64ca8a6b_19ea_0d1c_4d95_50301aca00b0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

configuration-metadata/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ParameterPropertyDescriptor.java lines 61–75

	private Object getDefaultValueFromAnnotation(MetadataGenerationEnvironment environment, Element element) {
		AnnotationMirror annotation = environment.getDefaultValueAnnotation(element);
		List<String> defaultValue = getDefaultValue(environment, annotation);
		if (defaultValue != null) {
			TypeMirror specificType = determineSpecificType(environment);
			try {
				List<Object> coerced = defaultValue.stream().map((value) -> coerceValue(specificType, value)).toList();
				return (coerced.size() != 1) ? coerced : coerced.get(0);
			}
			catch (IllegalArgumentException ex) {
				environment.getMessager().printMessage(Kind.ERROR, ex.getMessage(), element, annotation);
			}
		}
		return null;
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does getDefaultValueFromAnnotation() do?
getDefaultValueFromAnnotation() is a function in the spring-boot codebase.
What does getDefaultValueFromAnnotation() call?
getDefaultValueFromAnnotation() calls 3 function(s): coerceValue, determineSpecificType, getDefaultValue.
What calls getDefaultValueFromAnnotation()?
getDefaultValueFromAnnotation() is called by 1 function(s): resolveDefaultValue.

Analyze Your Own Codebase

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

Try Supermodel Free