* @param type the type to be handled
*
* @return the handler for the given type or {@code null} if no matching handler was found
*/
public ValidatedValueUnwrapper<?> getValidatedValueUnwrapper(Type type) {
TypeResolver typeResolver = typeResolutionHelper.getTypeResolver();
for ( ValidatedValueUnwrapper<?> handler : validatedValueUnwrappers ) {
ResolvedType handlerType = typeResolver.resolve( handler.getClass() );
List<ResolvedType> typeParameters = handlerType.typeParametersFor( ValidatedValueUnwrapper.class );
if ( TypeHelper.isAssignable( typeParameters.get( 0 ).getErasedType(), type ) ) {
return handler;
}