public class IfHandler extends CommandHandlerWithHelp
helpArg
Constructor and Description |
---|
IfHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
doHandle(CommandContext ctx) |
ConditionArgument |
getConditionArgument() |
boolean |
hasArgument(CommandContext ctx,
int index)
It has to accept everything since we don't know what kind of command will be edited.
|
boolean |
hasArgument(CommandContext ctx,
String name)
Checks whether the command handler recognizes the argument by the name.
|
boolean |
isAvailable(CommandContext ctx)
Checks whether the command is available in the current context
(e.g.
|
handle, isBatchMode, printHelp, printList
addArgument, getArgument, getArguments, recognizeArguments
public ConditionArgument getConditionArgument()
public boolean isAvailable(CommandContext ctx)
CommandHandler
isAvailable
in interface CommandHandler
isAvailable
in class CommandHandlerWithHelp
ctx
- current contextprotected void doHandle(CommandContext ctx) throws CommandLineException
doHandle
in class CommandHandlerWithHelp
CommandLineException
public boolean hasArgument(CommandContext ctx, int index)
hasArgument
in interface CommandHandler
hasArgument
in class CommandHandlerWithArguments
ctx
- the current contextindex
- argument index to checkpublic boolean hasArgument(CommandContext ctx, String name)
CommandHandler
hasArgument
in interface CommandHandler
hasArgument
in class CommandHandlerWithArguments
ctx
- the current contextname
- argument name to checkCopyright © 2023 JBoss by Red Hat. All rights reserved.