Home / Class/ GenericPersonConverter Class — spring-boot Architecture

GenericPersonConverter Class — spring-boot Architecture

Architecture documentation for the GenericPersonConverter class in ConfigurationPropertiesTests.java from the spring-boot codebase.

Entity Profile

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java lines 2640–2654

	static class GenericPersonConverter implements GenericConverter {

		@Override
		public Set<ConvertiblePair> getConvertibleTypes() {
			return Collections.singleton(new ConvertiblePair(String.class, Person.class));
		}

		@Override
		public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
			String[] content = StringUtils.split((String) source, " ");
			assertThat(content).isNotNull();
			return new Person(content[0], content[1]);
		}

	}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free