Home / Class/ GenericTypeFilter Class — spring-boot Architecture

GenericTypeFilter Class — spring-boot Architecture

Architecture documentation for the GenericTypeFilter class in LambdaSafe.java from the spring-boot codebase.

Entity Profile

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/util/LambdaSafe.java lines 364–380

	private static final class GenericTypeFilter<C, A> implements Filter<C, A> {

		@Override
		public boolean match(Class<C> callbackType, C callbackInstance, A argument,
				@Nullable Object @Nullable [] additionalArguments) {
			ResolvableType type = ResolvableType.forClass(callbackType, callbackInstance.getClass());
			if (type.getGenerics().length != 1) {
				return true;
			}
			Class<?> generic = type.resolveGeneric();
			if (generic != null) {
				return generic.isInstance(argument);
			}
			return true;
		}

	}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free