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>,java.lang.Class<?>,AnnotationAccessor>,java.lang.Object>
,java.util.function.Function<Triplet<CommandContext<C>,java.lang.Class<?>,AnnotationAccessor>,java.lang.Object>
public final class GuiceInjectionService<C> extends java.lang.Object implements InjectionService<C>
Injection service
that injects using a GuiceInjector
- Since:
- 1.4.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <C> GuiceInjectionService<C>
create(@NonNull com.google.inject.Injector injector)
Create a new Guice injection service that wraps the given injector@Nullable java.lang.Object
handle(@NonNull Triplet<CommandContext<C>,java.lang.Class<?>,AnnotationAccessor> triplet)
-
-
-
Method Detail
-
create
public static <C> GuiceInjectionService<C> create(@NonNull com.google.inject.Injector injector)
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 java.lang.Object handle(@NonNull Triplet<CommandContext<C>,java.lang.Class<?>,AnnotationAccessor> triplet)
- Specified by:
handle
in interfacecloud.commandframework.services.types.Service<Triplet<CommandContext<C>,java.lang.Class<?>,AnnotationAccessor>,java.lang.Object>
-
-