ReflectionUtils

Functions

Link copied to clipboard
fun Type.boxed(): Type

Converts a type to its corresponding boxed type if it is primitive. Else returns the type itself.

Link copied to clipboard
fun Class<*>.getParametrizedType(vararg typeArguments: Type): Type

Creates a parameterized type using the given class and type arguments.

Link copied to clipboard
inline fun <T> getType(): Type

Creates a parameterized type using template type arguments.

Link copied to clipboard

Converts a type to its corresponding unboxed type (if exists) if it is boxed. Else returns the type itself.