TypedParameterResolverFactory

abstract class TypedParameterResolverFactory<T : IParameterResolver<T>>(resolverType: KClass<out T>, val type: KType) : ParameterResolverFactory<T> (source)

Specialization of ParameterResolverFactory for a specific KType.

Your implementation needs to be annotated with @ResolverFactory.

You can also create a service factory using resolverFactory.

Parameters

resolverType

Class of the returned parameter resolver

type

Type of the objects returned by the parameter resolver

T

Type of the returned parameter resolver

See also

Constructors

Link copied to clipboard
constructor(resolverType: KClass<T>, type: KClass<*>)
constructor(resolverType: Class<T>, type: Class<*>)
constructor(resolverType: KClass<out T>, type: KType)

Properties

Link copied to clipboard
open val priority: Int

The priority of this factory.

Link copied to clipboard
Link copied to clipboard
open override val supportedTypesStr: List<String>

List of types as strings that are supported by this resolver factory.

Link copied to clipboard
val type: KType

Functions

Link copied to clipboard
abstract fun get(request: ResolverRequest): T

Returns a ParameterResolver for the given parameter.

Link copied to clipboard
open override fun isResolvable(request: ResolverRequest): Boolean

Determines if a given parameter is supported, only one factory must return true.

Link copied to clipboard
open override fun toString(): String