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

getMapValidator() — spring-boot Function Reference

Architecture documentation for the getMapValidator() function in ValidationBindHandlerTests.java from the spring-boot codebase.

Function java GradlePlugin DslExtensions calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  873d0a15_c30a_d212_0fe2_f0fe1d8a4193["getMapValidator()"]
  ca8ccd24_e9c4_6204_2248_333ac88b677e["validateMapValues()"]
  ca8ccd24_e9c4_6204_2248_333ac88b677e -->|calls| 873d0a15_c30a_d212_0fe2_f0fe1d8a4193
  006cfb1f_c339_7371_468c_ffb9c45c592b["validateMapValuesWithNonUniformSource()"]
  006cfb1f_c339_7371_468c_ffb9c45c592b -->|calls| 873d0a15_c30a_d212_0fe2_f0fe1d8a4193
  39a3e1a6_7fbd_51cf_7052_b0077ff0e630["getItems()"]
  873d0a15_c30a_d212_0fe2_f0fe1d8a4193 -->|calls| 39a3e1a6_7fbd_51cf_7052_b0077ff0e630
  style 873d0a15_c30a_d212_0fe2_f0fe1d8a4193 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/validation/ValidationBindHandlerTests.java lines 241–265

	private Validator getMapValidator() {
		return new Validator() {

			@Override
			public boolean supports(Class<?> type) {
				return ExampleWithMap.class == type;

			}

			@Override
			public void validate(Object target, Errors errors) {
				ExampleWithMap value = (ExampleWithMap) target;
				value.getItems().forEach((k, v) -> {
					try {
						errors.pushNestedPath("items[" + k + "]");
						ValidationUtils.rejectIfEmptyOrWhitespace(errors, "number", "NUMBER_ERR");
					}
					finally {
						errors.popNestedPath();
					}
				});
			}

		};
	}

Domain

Subdomains

Calls

  • getItems()

Frequently Asked Questions

What does getMapValidator() do?
getMapValidator() is a function in the spring-boot codebase.
What does getMapValidator() call?
getMapValidator() calls 1 function(s): getItems.
What calls getMapValidator()?
getMapValidator() is called by 2 function(s): validateMapValues, validateMapValuesWithNonUniformSource.

Analyze Your Own Codebase

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

Try Supermodel Free