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>
@API(status=STABLE,
since="1.4.0")
public final class GuiceInjectionService<C>
extends Object
implements InjectionService<C>
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 Object
handle
(@NonNull Triplet<CommandContext<C>, Class<?>, AnnotationAccessor> triplet) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
handle
in interfacecloud.commandframework.services.types.Service<Triplet<CommandContext<C>,
Class<?>, AnnotationAccessor>, Object>
-