Interface ICommand
-
- All Known Implementing Classes:
AbstractParentCommand
,AbstractTerminalCommand
public interface ICommand
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Collection<? extends org.apache.commons.cli.Option>
gatherOptions()
String
getDescription()
default List<ExtraArgument>
getExtraArguments()
String
getName()
default ICommand
getSubCommandByName(String name)
Collection<ICommand>
getSubCommands()
boolean
isSubCommandRequired()
ICommandExecutor
newExecutor(CLIProcessor.CallingContext callingContext, org.apache.commons.cli.CommandLine cmdLine)
default int
requiredExtraArgumentsCount()
default void
validateOptions(CLIProcessor.CallingContext callingContext, org.apache.commons.cli.CommandLine cmdLine)
-
-
-
Method Detail
-
getDescription
@NonNull String getDescription()
-
getExtraArguments
@NonNull default List<ExtraArgument> getExtraArguments()
-
requiredExtraArgumentsCount
default int requiredExtraArgumentsCount()
-
gatherOptions
@NonNull default Collection<? extends org.apache.commons.cli.Option> gatherOptions()
-
getSubCommands
@NonNull Collection<ICommand> getSubCommands()
-
isSubCommandRequired
boolean isSubCommandRequired()
-
getSubCommandByName
default ICommand getSubCommandByName(@NonNull String name)
-
validateOptions
default void validateOptions(@NonNull CLIProcessor.CallingContext callingContext, @NonNull org.apache.commons.cli.CommandLine cmdLine) throws InvalidArgumentException
- Throws:
InvalidArgumentException
-
newExecutor
@NonNull ICommandExecutor newExecutor(@NonNull CLIProcessor.CallingContext callingContext, @NonNull org.apache.commons.cli.CommandLine cmdLine)
-
-