public class LegacyCommandsHandler extends AbstractInvokeListener implements InvokeHandler
| Constructor and Description |
|---|
LegacyCommandsHandler() |
| Modifier and Type | Method and Description |
|---|---|
InvokeHandler |
createInvokeHandler()
Create a new invocation handler.
|
void |
postInvoke(Object object,
Method method,
com.google.common.collect.ImmutableList<? extends ParameterData<?>> parameters,
Object[] args,
CommandContext context,
CommandLocals locals)
Called after the parameter is invoked.
|
boolean |
preInvoke(Object object,
Method method,
com.google.common.collect.ImmutableList<? extends ParameterData<?>> parameters,
Object[] args,
CommandContext context,
CommandLocals locals)
Called before the parameter is invoked.
|
boolean |
preProcess(Object object,
Method method,
com.google.common.collect.ImmutableList<? extends ParameterData<?>> parameters,
CommandContext context,
CommandLocals locals)
Called before parameters are processed.
|
void |
updateDescription(Object object,
Method method,
com.google.common.collect.ImmutableList<? extends ParameterData<?>> parameters,
SettableDescription description)
During creation of a
CommandCallable by a ParametricBuilder,
this will be called in case the description needs to be updated. |
public InvokeHandler createInvokeHandler()
InvokeListenerAn example use of an InvokeHandler would be to verify permissions
added by the Require annotation.
For simple InvokeHandler, an object can implement both this
interface and InvokeHandler.
createInvokeHandler in interface InvokeListenerpublic boolean preProcess(Object object, Method method, com.google.common.collect.ImmutableList<? extends ParameterData<?>> parameters, CommandContext context, CommandLocals locals) throws CommandException, ParameterException
InvokeHandlerpreProcess in interface InvokeHandlerobject - the objectmethod - the methodparameters - the list of parameterscontext - the contextlocals - the locals objectCommandException - can be thrown for an error, which will stop invocationParameterException - on parameter errorpublic boolean preInvoke(Object object, Method method, com.google.common.collect.ImmutableList<? extends ParameterData<?>> parameters, Object[] args, CommandContext context, CommandLocals locals) throws ParameterException, UnconsumedParameterException
InvokeHandlerpreInvoke in interface InvokeHandlerobject - the objectmethod - the methodparameters - the list of parametersargs - the arguments to be given to the methodcontext - the contextlocals - the locals objectParameterException - on parameter errorUnconsumedParameterExceptionpublic void postInvoke(Object object, Method method, com.google.common.collect.ImmutableList<? extends ParameterData<?>> parameters, Object[] args, CommandContext context, CommandLocals locals)
InvokeHandlerpostInvoke in interface InvokeHandlerobject - the objectmethod - the methodparameters - the list of parametersargs - the arguments to be given to the methodcontext - the contextlocals - the locals objectpublic void updateDescription(Object object, Method method, com.google.common.collect.ImmutableList<? extends ParameterData<?>> parameters, SettableDescription description)
InvokeListenerCommandCallable by a ParametricBuilder,
this will be called in case the description needs to be updated.updateDescription in interface InvokeListenerupdateDescription in class AbstractInvokeListenerobject - the objectmethod - the methodparameters - a list of parametersdescription - the description to be updatedCopyright © 2015. All Rights Reserved.