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()StringgetDescription()default List<ExtraArgument>getExtraArguments()StringgetName()default ICommandgetSubCommandByName(String name)Collection<ICommand>getSubCommands()booleanisSubCommandRequired()ICommandExecutornewExecutor(CLIProcessor.CallingContext callingContext, org.apache.commons.cli.CommandLine cmdLine)default intrequiredExtraArgumentsCount()default voidvalidateOptions(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)
-
-