Undeprecate TypeVariableMap methods on GenericTypeResolver
Issue: SPR-15429
(cherry picked from commit 7fbc20e)
This commit is contained in:
@@ -80,7 +80,6 @@ public abstract class GenericTypeResolver {
|
||||
* @param method the method to introspect
|
||||
* @param clazz the class to resolve type variables against
|
||||
* @return the corresponding generic parameter or return type
|
||||
* @see #resolveReturnTypeForGenericMethod
|
||||
*/
|
||||
public static Class<?> resolveReturnType(Method method, Class<?> clazz) {
|
||||
Assert.notNull(method, "Method must not be null");
|
||||
@@ -118,8 +117,9 @@ public abstract class GenericTypeResolver {
|
||||
* (may be {@code null})
|
||||
* @return the resolved target return type, the standard return type, or {@code null}
|
||||
* @since 3.2.5
|
||||
* @see #resolveReturnType
|
||||
* @deprecated as of Spring Framework 4.3.8, superseded by {@link ResolvableType} usage
|
||||
*/
|
||||
@Deprecated
|
||||
public static Class<?> resolveReturnTypeForGenericMethod(Method method, Object[] args, ClassLoader classLoader) {
|
||||
Assert.notNull(method, "Method must not be null");
|
||||
Assert.notNull(args, "Argument array must not be null");
|
||||
@@ -250,12 +250,11 @@ public abstract class GenericTypeResolver {
|
||||
|
||||
/**
|
||||
* Resolve the specified generic type against the given TypeVariable map.
|
||||
* <p>Used by Spring Data.
|
||||
* @param genericType the generic type to resolve
|
||||
* @param map the TypeVariable Map to resolved against
|
||||
* @return the type if it resolves to a Class, or {@code Object.class} otherwise
|
||||
* @deprecated as of Spring 4.0 in favor of {@link ResolvableType}
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static Class<?> resolveType(Type genericType, Map<TypeVariable, Type> map) {
|
||||
return ResolvableType.forType(genericType, new TypeVariableMapVariableResolver(map)).resolve(Object.class);
|
||||
@@ -263,11 +262,10 @@ public abstract class GenericTypeResolver {
|
||||
|
||||
/**
|
||||
* Build a mapping of {@link TypeVariable#getName TypeVariable names} to
|
||||
* {@link Class concrete classes} for the specified {@link Class}. Searches
|
||||
* all super types, enclosing types and interfaces.
|
||||
* @deprecated as of Spring 4.0 in favor of {@link ResolvableType}
|
||||
* {@link Class concrete classes} for the specified {@link Class}.
|
||||
* Searches all super types, enclosing types and interfaces.
|
||||
* @see #resolveType(Type, Map)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static Map<TypeVariable, Type> getTypeVariableMap(Class<?> clazz) {
|
||||
Map<TypeVariable, Type> typeVariableMap = typeVariableCache.get(clazz);
|
||||
|
||||
Reference in New Issue
Block a user