diff --git a/cloud-core/src/main/java/cloud/commandframework/annotations/injection/ParameterInjectorRegistry.java b/cloud-core/src/main/java/cloud/commandframework/annotations/injection/ParameterInjectorRegistry.java index 55c1ad62..ba6db9d9 100644 --- a/cloud-core/src/main/java/cloud/commandframework/annotations/injection/ParameterInjectorRegistry.java +++ b/cloud-core/src/main/java/cloud/commandframework/annotations/injection/ParameterInjectorRegistry.java @@ -82,6 +82,12 @@ public final class ParameterInjectorRegistry implements InjectionService { /** * Register an injector for a particular type predicate. * + *

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.

+ * * @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 Injected type