Example usage for org.springframework.core GenericTypeResolver resolveType

List of usage examples for org.springframework.core GenericTypeResolver resolveType

Introduction

In this page you can find the example usage for org.springframework.core GenericTypeResolver resolveType.

Prototype

@SuppressWarnings("rawtypes")
public static Class<?> resolveType(Type genericType, Map<TypeVariable, Type> map) 

Source Link

Document

Resolve the specified generic type against the given TypeVariable map.

Usage

From source file:org.springframework.http.codec.json.Jackson2CodecSupport.java

protected JavaType getJavaType(Type type, @Nullable Class<?> contextClass) {
    TypeFactory typeFactory = this.objectMapper.getTypeFactory();
    return typeFactory.constructType(GenericTypeResolver.resolveType(type, contextClass));
}