public abstract class CommandHandlerWithArguments extends Object implements CommandHandler
| Constructor and Description |
|---|
CommandHandlerWithArguments() |
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(CommandArgument arg) |
CommandArgument |
getArgument(CommandContext ctx,
String name)
Returns command argument declared by the command handler
corresponding to the argument name.
|
Collection<CommandArgument> |
getArguments(CommandContext ctx)
Returns a collection of the command arguments the handler supports in the current context.
|
boolean |
hasArgument(CommandContext ctx,
int index)
Checks whether the command handler accepts an argument with the specified index.
|
boolean |
hasArgument(CommandContext ctx,
String name)
Checks whether the command handler recognizes the argument by the name.
|
protected void |
recognizeArguments(CommandContext ctx) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandle, isAvailable, isBatchModepublic void addArgument(CommandArgument arg)
public CommandArgument getArgument(CommandContext ctx, String name)
CommandHandlergetArgument in interface CommandHandlerctx - the current contextname - the name of the argumentpublic boolean hasArgument(CommandContext ctx, String name)
CommandHandlerhasArgument in interface CommandHandlerctx - the current contextname - argument name to checkpublic boolean hasArgument(CommandContext ctx, int index)
CommandHandlerhasArgument in interface CommandHandlerctx - the current contextindex - argument index to checkpublic Collection<CommandArgument> getArguments(CommandContext ctx)
CommandHandlergetArguments in interface CommandHandlerctx - current command line contextprotected void recognizeArguments(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.