Improve doc on ParameterInjectorRegistry#registerInjector (#423)

This commit is contained in:
Jason 2022-12-15 13:20:53 -07:00
parent 9e257ce365
commit 6fe744f33c

View file

@ -82,6 +82,12 @@ public final class ParameterInjectorRegistry<C> implements InjectionService<C> {
/**
* Register an injector for a particular type predicate.
*
* <p>The predicate should only
* return true if the injected type is assignable to the tested type. This predicate overload
* is provided in addition to {@link #registerInjector(Class, ParameterInjector)} to allow
* for exact, non-exact, or custom predicates, however is still bound by the aforementioned constraint.
* Failure to adhere to this will result in runtime exceptions.</p>
*
* @param predicate A predicate that matches if the injector should be used for a type
* @param injector The injector that should inject the value into the command method
* @param <T> Injected type