Package org.springdoc.core
Interface ReturnTypeParser
public interface ReturnTypeParser
The interface Return type parser.
- Author:
- bnasslahsen
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidfindTypeForGenerics(Class<?>[] generics, Type[] typeArguments, org.springframework.core.ResolvableType contextType) Find type for generics.static org.springframework.core.ResolvableTypegetResolvedType(org.springframework.core.ResolvableType resolvableType, Class<?> contextClass) Gets resolved type.default TypegetReturnType(org.springframework.core.MethodParameter methodParameter) Gets return type.static TypegetType(org.springframework.core.MethodParameter methodParameter) Gets type.static TyperesolveType(Type genericType, Class<?> contextClass) This is a copy of GenericTypeResolver.resolveType which is not available on spring 4.static voidresolveType(org.springframework.core.ResolvableType[] resolvableTypes, Class<?> contextClass) Resolve type.static org.springframework.core.ResolvableTyperesolveVariable(TypeVariable<?> typeVariable, org.springframework.core.ResolvableType contextType) Resolve variable resolvable type.
-
Method Details
-
resolveType
This is a copy of GenericTypeResolver.resolveType which is not available on spring 4. This also keeps compatibility with spring-boot 1 applications. Resolve the given generic type against the given context class, substituting type variables as far as possible.- Parameters:
genericType- the (potentially) generic typecontextClass- a context class for the target type, for example a class in which the target type appears in a method signature (can benull)- Returns:
- the resolved type (possibly the given generic type as-is)
- Since:
- 5.0
-
resolveType
static void resolveType(org.springframework.core.ResolvableType[] resolvableTypes, Class<?> contextClass) Resolve type.- Parameters:
resolvableTypes- the resolvable typescontextClass- the context class
-
getResolvedType
static org.springframework.core.ResolvableType getResolvedType(org.springframework.core.ResolvableType resolvableType, Class<?> contextClass) Gets resolved type.- Parameters:
resolvableType- the resolvable typecontextClass- the context class- Returns:
- the resolved type
-
findTypeForGenerics
static void findTypeForGenerics(Class<?>[] generics, Type[] typeArguments, org.springframework.core.ResolvableType contextType) Find type for generics.- Parameters:
generics- the genericstypeArguments- the type argumentscontextType- the context type
-
resolveVariable
static org.springframework.core.ResolvableType resolveVariable(TypeVariable<?> typeVariable, org.springframework.core.ResolvableType contextType) Resolve variable resolvable type.- Parameters:
typeVariable- the type variablecontextType- the context type- Returns:
- the resolvable type
-
getReturnType
Gets return type.- Parameters:
methodParameter- the method parameter- Returns:
- the return type
-
getType
Gets type.- Parameters:
methodParameter- the method parameter- Returns:
- the type
-