Parameter Resolver Factory
Factory for parameter resolvers.
Your implementation needs to be annotated with @ResolverFactory.
How it works
A factory determines if a given parameter is supported, if so, a parameter resolver will be created.
If multiple factories return true
in isResolvable for a given type, the factory with the best priority is taken, if two with the same top priority exists, an exception is thrown.
Use cases
This is particularly useful if your parameter's type has generics, which you may read in ParameterWrapper.type, or if you need to read an annotation on the parameter to adjust the resolver's behavior, for example.
In case you want to read generics, you can read them off the KType in ParameterWrapper, but you can only do that with Kotlin.
In case you want to read the annotations, you can use the methods supplied by ParameterWrapper.
Parameters
Type of the returned parameter resolver
See also
Inheritors
Properties
Functions
Returns a ParameterResolver for the given parameter.
Determines if a given parameter is supported, only one factory must return true
.