Interface ParameterInjector<C,T>
-
- Type Parameters:
C- Command sender typeT- Type of the value that is injected by this injector
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ParameterInjector<C,T>Injector that injects parameters intoCommandMethodannotated methods- Since:
- 1.2.0
-
-
Method Summary
Modifier and Type Method Description @Nullable Tcreate(@NonNull cloud.commandframework.context.CommandContext<C> context, @NonNull cloud.commandframework.annotations.AnnotationAccessor annotationAccessor)Attempt to create a a value that should then be injected into theCommandMethodannotated method.
-
-
-
Method Detail
-
create
@Nullable T create(@NonNull cloud.commandframework.context.CommandContext<C> context, @NonNull cloud.commandframework.annotations.AnnotationAccessor annotationAccessor)
Attempt to create a a value that should then be injected into theCommandMethodannotated method. If the injector cannot (or shouldn't) create a value, it is free to returnnull.- Parameters:
context- Command context that is requesting the injectionannotationAccessor- Annotation accessor proxying the method which the value is being injected into- Returns:
- The value, if it could be created. Else
null, in which case no value will be injected by this particular injector
-
-