public abstract class CommandHandlerWithArguments extends Object implements CommandHandler
Constructor and Description |
---|
CommandHandlerWithArguments() |
Modifier and Type | Method and Description |
---|---|
void |
addArgument(CommandArgument arg) |
Collection<CommandArgument> |
getArguments(CommandContext ctx)
Returns a collection of the command arguments the handler supports in the current context.
|
boolean |
hasArgument(int index)
Checks whether the command handler accepts an argument with the specified index.
|
boolean |
hasArgument(String name)
Checks whether the command handler recognizes the argument by the name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handle, isAvailable, isBatchMode
public void addArgument(CommandArgument arg)
public boolean hasArgument(String name)
CommandHandler
hasArgument
in interface CommandHandler
name
- argument name to checkpublic boolean hasArgument(int index)
CommandHandler
hasArgument
in interface CommandHandler
index
- argument index to checkpublic Collection<CommandArgument> getArguments(CommandContext ctx)
CommandHandler
getArguments
in interface CommandHandler
ctx
- current command line contextCopyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.