Class GuiceInjectionService<C>
java.lang.Object
cloud.commandframework.annotations.injection.GuiceInjectionService<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
InjectionService<C>,cloud.commandframework.services.types.Service<Triplet<CommandContext<C>,,Class<?>, AnnotationAccessor>, Object> Function<Triplet<CommandContext<C>,Class<?>, AnnotationAccessor>, Object>
Injection service that injects using a Guice Injector- Since:
- 1.4.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> GuiceInjectionService<C>create(@NonNull com.google.inject.Injector injector) Create a new Guice injection service that wraps the given injector@Nullable Objecthandle(@NonNull Triplet<CommandContext<C>, Class<?>, AnnotationAccessor> triplet) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cloud.commandframework.services.types.Service
apply, order
-
Method Details
-
create
Create a new Guice injection service that wraps the given injector- Type Parameters:
C- Command sender type- Parameters:
injector- Injector to wrap- Returns:
- the created injection service
-
handle
public @Nullable Object handle(@NonNull Triplet<CommandContext<C>, Class<?>, AnnotationAccessor> triplet) - Specified by:
handlein interfacecloud.commandframework.services.types.Service<Triplet<CommandContext<C>,Class<?>, AnnotationAccessor>, Object>
-