MockDataSizeTypeDescriptor Class — spring-boot Architecture
Architecture documentation for the MockDataSizeTypeDescriptor class in MockDataSizeTypeDescriptor.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot/src/test/java/org/springframework/boot/convert/MockDataSizeTypeDescriptor.java lines 37–55
public final class MockDataSizeTypeDescriptor {
private MockDataSizeTypeDescriptor() {
}
@SuppressWarnings({ "rawtypes", "unchecked" })
public static TypeDescriptor get(@Nullable DataUnit unit) {
TypeDescriptor descriptor = mock(TypeDescriptor.class);
if (unit != null) {
DataSizeUnit unitAnnotation = AnnotationUtils.synthesizeAnnotation(Collections.singletonMap("value", unit),
DataSizeUnit.class, null);
given(descriptor.getAnnotation(DataSizeUnit.class)).willReturn(unitAnnotation);
}
given(descriptor.getType()).willReturn((Class) DataSize.class);
given(descriptor.getObjectType()).willReturn((Class) DataSize.class);
return descriptor;
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free