Package org.incendo.cloud.annotations
Class MethodCommandExecutionHandler<C>
java.lang.Object
org.incendo.cloud.annotations.method.AnnotatedMethodHandler<C>
org.incendo.cloud.annotations.MethodCommandExecutionHandler<C>
- Type Parameters:
C- command sender type
- All Implemented Interfaces:
CommandExecutionHandler<C>,CommandExecutionHandler.FutureCommandExecutionHandler<C>
public class MethodCommandExecutionHandler<C>
extends AnnotatedMethodHandler<C>
implements CommandExecutionHandler.FutureCommandExecutionHandler<C>
A command execution handler that invokes a method.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContext for command methodsNested classes/interfaces inherited from interface org.incendo.cloud.execution.CommandExecutionHandler
CommandExecutionHandler.FutureCommandExecutionHandler<C> -
Constructor Summary
ConstructorsConstructorDescriptionMethodCommandExecutionHandler(@NonNull MethodCommandExecutionHandler.CommandMethodContext<C> context) Constructs a new method command execution handler -
Method Summary
Modifier and TypeMethodDescriptioncontext()Returns the command method contextexecuteFuture(@NonNull CommandContext<C> commandContext) protected final @Nullable ParameterValuegetParameterValue(@NonNull Parameter parameter, @NonNull CommandContext<C> context) Returns the value for the givenparameter, if possible.Methods inherited from class org.incendo.cloud.annotations.method.AnnotatedMethodHandler
annotationAccessor, createParameterValues, createParameterValues, createParameterValues, getInjectedValue, injectorRegistry, methodHandle, parametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.incendo.cloud.execution.CommandExecutionHandler.FutureCommandExecutionHandler
execute
-
Constructor Details
-
MethodCommandExecutionHandler
public MethodCommandExecutionHandler(@NonNull MethodCommandExecutionHandler.CommandMethodContext<C> context) Constructs a new method command execution handler- Parameters:
context- The context
-
-
Method Details
-
context
Returns the command method context- Returns:
- The context
-
executeFuture
- Specified by:
executeFuturein interfaceCommandExecutionHandler<C>- Specified by:
executeFuturein interfaceCommandExecutionHandler.FutureCommandExecutionHandler<C>
-
getParameterValue
protected final @Nullable ParameterValue getParameterValue(@NonNull Parameter parameter, @NonNull CommandContext<C> context) Description copied from class:AnnotatedMethodHandlerReturns the value for the givenparameter, if possible.- Overrides:
getParameterValuein classAnnotatedMethodHandler<C>- Parameters:
parameter- parameter to get value forcontext- the command context- Returns:
- the value, or
null
-