Class GenericTypeResolver
java.lang.Object
io.fluxzero.common.reflection.GenericTypeResolver
Utility class for resolving generic type information in class hierarchies. This class provides methods to resolve and
extract generic type details, including parameterized and array types, from a given class type in relation to a
target type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TypegetGenericType(Class<?> clazz, Class<?> target) static ParameterizedTypeparameterize(Class<?> rawType, Type... actualTypeArguments) Creates a parameterized type for a raw class and its actual type arguments.static TypeResolves a type declared bydeclaringTypein the generic context ofcontextType.
-
Constructor Details
-
GenericTypeResolver
public GenericTypeResolver()
-
-
Method Details
-
parameterize
Creates a parameterized type for a raw class and its actual type arguments. -
getGenericType
-
resolve
Resolves a type declared bydeclaringTypein the generic context ofcontextType.- Parameters:
type- declared type to resolvecontextType- concrete subtype that supplies the type argumentsdeclaringType- type that declarestype
-