public interface InvokeHandler
ParametricBuilder to
listen in on commands being executed.
Invoke handlers have access to three different stages of command execution and can view the annotations, parameters, and arguments of the command. An invoke handler could be used to implement command logging, for example.
| Modifier and Type | Method and Description |
|---|---|
void |
postInvoke(List<? extends Annotation> annotations,
ArgumentParser parser,
Object[] args,
CommandArgs commandArgs)
Called after the command has been executed.
|
boolean |
preInvoke(List<? extends Annotation> annotations,
ArgumentParser parser,
Object[] args,
CommandArgs commandArgs)
Called after arguments have been parsed but the command has yet
to be executed.
|
boolean |
preProcess(List<? extends Annotation> annotations,
ArgumentParser parser,
CommandArgs commandArgs)
Called before arguments have been parsed.
|
boolean preProcess(List<? extends Annotation> annotations, ArgumentParser parser, CommandArgs commandArgs) throws CommandException, ArgumentException
annotations - The list of annotations on the commandparser - The argument parser with parameter informationcommandArgs - The arguments provided by the userCommandException - Thrown if there is a general command problemArgumentException - Thrown is there is an error with the argumentsboolean preInvoke(List<? extends Annotation> annotations, ArgumentParser parser, Object[] args, CommandArgs commandArgs) throws CommandException, ArgumentException
annotations - The list of annotations on the commandparser - The argument parser with parameter informationargs - The result of the parsed arguments: Java objects to be passed to the commandcommandArgs - The arguments provided by the userCommandException - Thrown if there is a general command problemArgumentException - Thrown is there is an error with the argumentsvoid postInvoke(List<? extends Annotation> annotations, ArgumentParser parser, Object[] args, CommandArgs commandArgs) throws CommandException, ArgumentException
annotations - The list of annotations on the commandparser - The argument parser with parameter informationargs - The result of the parsed arguments: Java objects to be passed to the commandcommandArgs - The arguments provided by the userCommandException - Thrown if there is a general command problemArgumentException - Thrown is there is an error with the argumentsCopyright © 2015. All Rights Reserved.