public final class Types extends Object
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
getRawType(Type type) |
static ParameterizedType |
parameterize(Class<?> rawClass,
Type... typeArguments) |
static Type |
resolve(Type context,
Class<?> contextRawType,
Type toResolve) |
static Type |
resolveLastTypeParameter(Type genericContext,
Class<?> supertype)
Resolves the last type parameter of the parameterized
supertype, based on the genericContext, into its upper bounds. |
static Type |
resolveReturnType(Type baseType,
Type overridingType) |
public static Type resolveLastTypeParameter(Type genericContext, Class<?> supertype) throws IllegalStateException
supertype, based on the genericContext, into its upper bounds.
Implementation copied from retrofit.RestMethodInfo.genericContext - Ex. Field.getGenericType()supertype - Ex. Decoder.classDecoder.IllegalStateException - if supertype cannot be resolved into a parameterized type
using context.public static ParameterizedType parameterize(Class<?> rawClass, Type... typeArguments)
Copyright © 2012–2024 OpenFeign. All rights reserved.