Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- AbstractCommandExecutor - Class in dev.metaschema.cli.processor.command
-
A base class for implementation that perform the operation supported by a command.
- AbstractCommandExecutor(CallingContext, CommandLine) - Constructor for class dev.metaschema.cli.processor.command.AbstractCommandExecutor
-
Construct a new command executor.
- AbstractExitStatus - Class in dev.metaschema.cli.processor
-
Records information about the exit status of a CLI command.
- AbstractExitStatus(ExitCode) - Constructor for class dev.metaschema.cli.processor.AbstractExitStatus
-
Construct a new exit status based on the provided
exitCode. - AbstractParentCommand - Class in dev.metaschema.cli.processor.command
-
A base class for a command that supports hierarchical command structure with child commands.
- AbstractParentCommand() - Constructor for class dev.metaschema.cli.processor.command.AbstractParentCommand
-
Construct a new parent command.
- AbstractTerminalCommand - Class in dev.metaschema.cli.processor.command
-
A base class for terminal commands in the command processing hierarchy.
- AbstractTerminalCommand() - Constructor for class dev.metaschema.cli.processor.command.AbstractTerminalCommand
- addCommandHandler(ICommand) - Method in class dev.metaschema.cli.processor.CLIProcessor
-
Register a new command handler.
- addCommandHandler(ICommand) - Method in class dev.metaschema.cli.processor.command.AbstractParentCommand
-
Add a child command.
- applyGlobalOptions(CommandLine) - Method in class dev.metaschema.cli.processor.CallingContext
-
Apply global options like --no-color and --quiet.
B
- BASH - Enum constant in enum dev.metaschema.cli.processor.command.ShellCompletionCommand.Shell
-
Bash shell.
- BASH - Enum constant in enum dev.metaschema.cli.processor.completion.CompletionScriptGenerator.Shell
-
Bash shell.
C
- CallingContext - Class in dev.metaschema.cli.processor
-
Records information about the command line options and called command hierarchy.
- checkHelpAndVersion() - Method in class dev.metaschema.cli.processor.CallingContext
-
Check for --help and --version options before full parsing.
- CLIProcessor - Class in dev.metaschema.cli.processor
-
Processes command line arguments and dispatches called commands.
- CLIProcessor(String) - Constructor for class dev.metaschema.cli.processor.CLIProcessor
-
The main entry point for CLI processing.
- CLIProcessor(String, Map<String, IVersionInfo>) - Constructor for class dev.metaschema.cli.processor.CLIProcessor
-
The main entry point for CLI processing.
- CLIProcessor(String, Map<String, IVersionInfo>, PrintStream) - Constructor for class dev.metaschema.cli.processor.CLIProcessor
-
The main entry point for CLI processing.
- COMMAND_VERSION - Static variable in class dev.metaschema.cli.processor.CLIProcessor
-
Used to identify the version info for the command.
- CommandExecutionException - Exception in dev.metaschema.cli.processor.command
-
For use in commands to short-circut command execution.
- CommandExecutionException(ExitCode) - Constructor for exception dev.metaschema.cli.processor.command.CommandExecutionException
-
Constructs a new exception with the provided
code, and no message or cause. - CommandExecutionException(ExitCode, String) - Constructor for exception dev.metaschema.cli.processor.command.CommandExecutionException
-
Constructs a new exception with the provided
code,message, and no cause. - CommandExecutionException(ExitCode, String, Throwable) - Constructor for exception dev.metaschema.cli.processor.command.CommandExecutionException
-
Constructs a new exception with the provided
code,message, andcause. - CommandExecutionException(ExitCode, Throwable) - Constructor for exception dev.metaschema.cli.processor.command.CommandExecutionException
-
Constructs a new exception with no message and the provided
codeandcause. - CommandService - Class in dev.metaschema.cli.processor.command
-
A service that loads commands using SPI.
- CompletionScriptGenerator - Class in dev.metaschema.cli.processor.completion
-
Generates shell completion scripts for Bash and Zsh.
- CompletionScriptGenerator(String, List<ICommand>) - Constructor for class dev.metaschema.cli.processor.completion.CompletionScriptGenerator
-
Construct a new generator.
- CompletionScriptGenerator.Shell - Enum in dev.metaschema.cli.processor.completion
-
Supported shell types.
- CompletionTypeRegistry - Class in dev.metaschema.cli.processor.completion
-
Registry for mapping Java types to their shell completion behavior.
D
- DefaultExtraArgument - Class in dev.metaschema.cli.processor.command.impl
-
A default implementation of the
ExtraArgumentinterface that represents a named command-line argument which can be marked as required or optional. - DefaultExtraArgument(String, boolean) - Constructor for class dev.metaschema.cli.processor.command.impl.DefaultExtraArgument
-
Construct a new instance.
- DefaultExtraArgument(String, boolean, Class<?>) - Constructor for class dev.metaschema.cli.processor.command.impl.DefaultExtraArgument
-
Construct a new instance with type information for shell completion.
- dev.metaschema.cli.processor - module dev.metaschema.cli.processor
-
Provides a command-line interface processing framework for Metaschema tools.
- dev.metaschema.cli.processor - package dev.metaschema.cli.processor
- dev.metaschema.cli.processor.command - package dev.metaschema.cli.processor.command
- dev.metaschema.cli.processor.command.impl - package dev.metaschema.cli.processor.command.impl
- dev.metaschema.cli.processor.completion - package dev.metaschema.cli.processor.completion
E
- execute() - Method in class dev.metaschema.cli.processor.command.AbstractCommandExecutor
- execute() - Method in interface dev.metaschema.cli.processor.command.ICommandExecutor
-
Execute the command operation.
- execute(CallingContext, CommandLine) - Method in interface dev.metaschema.cli.processor.command.ICommandExecutor.ExecutionFunction
-
Execute a command operation.
- executeCommand(CallingContext, CommandLine) - Method in class dev.metaschema.cli.processor.command.ShellCompletionCommand
-
Execute the shell completion generation.
- exit() - Method in enum dev.metaschema.cli.processor.ExitCode
-
Exit without a message.
- ExitCode - Enum in dev.metaschema.cli.processor
-
An enumeration of supported exit code values.
- exitMessage() - Method in enum dev.metaschema.cli.processor.ExitCode
-
Exit with the associated message.
- exitMessage(Object...) - Method in enum dev.metaschema.cli.processor.ExitCode
-
Exit with the associated message and message arguments.
- ExitStatus - Interface in dev.metaschema.cli.processor
-
Implementations provide details around the result of processing a set of command line arguments.
- ExtraArgument - Interface in dev.metaschema.cli.processor.command
-
A representation of an extra, non-option command line argument.
F
- FAIL - Enum constant in enum dev.metaschema.cli.processor.ExitCode
-
The command executed properly, but the operation failed.
- forEnum(Class<E>) - Static method in class dev.metaschema.cli.processor.completion.CompletionTypeRegistry
-
Create a completion type for an enum using its constant names.
- fromString(String) - Static method in enum dev.metaschema.cli.processor.command.ShellCompletionCommand.Shell
-
Parse a shell type from a string.
G
- gatherOptions() - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Used to gather options directly associated with this command.
- gatherOptions() - Method in class dev.metaschema.cli.processor.command.ShellCompletionCommand
- generateBashCompletion() - Method in class dev.metaschema.cli.processor.completion.CompletionScriptGenerator
-
Generate a Bash completion script.
- generateMessage(boolean) - Method in class dev.metaschema.cli.processor.AbstractExitStatus
-
Generates and logs a message based on the current exit status.
- generateMessage(boolean) - Method in interface dev.metaschema.cli.processor.ExitStatus
-
Process the exit status.
- generateZshCompletion() - Method in class dev.metaschema.cli.processor.completion.CompletionScriptGenerator
-
Generate a Zsh completion script.
- getBashCompletion() - Method in interface dev.metaschema.cli.processor.completion.ICompletionType
-
Generate Bash completion code for this type.
- getCallingContext() - Method in class dev.metaschema.cli.processor.command.AbstractCommandExecutor
-
Get the context of the command execution, which provides access to the execution environment needed for command processing.
- getCLIProcessor() - Method in class dev.metaschema.cli.processor.CallingContext
-
Get the command line processor instance that generated this calling context.
- getCommand() - Method in class dev.metaschema.cli.processor.command.AbstractCommandExecutor
-
Get the command associated with this execution.
- getCommandLine() - Method in class dev.metaschema.cli.processor.command.AbstractCommandExecutor
-
Get the parsed command line details containing the command options and arguments provided by the user during execution.
- getCommands() - Method in class dev.metaschema.cli.processor.command.CommandService
-
Get the loaded commands.
- getCommands() - Method in class dev.metaschema.cli.processor.completion.CompletionScriptGenerator
-
Get the commands.
- getCurrentWorkingDirectory() - Static method in class dev.metaschema.cli.processor.command.AbstractTerminalCommand
-
A utility method that can be used to get the current working directory.
- getDescription() - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Get a description of what the command does.
- getDescription() - Method in class dev.metaschema.cli.processor.command.ShellCompletionCommand
- getExec() - Method in class dev.metaschema.cli.processor.CLIProcessor
-
Gets the command used to execute for use in help text.
- getExitCode() - Method in class dev.metaschema.cli.processor.AbstractExitStatus
- getExitCode() - Method in interface dev.metaschema.cli.processor.ExitStatus
-
Get the exit code information associated with this exit status.
- getExtraArguments() - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Get the non-option arguments.
- getExtraArguments() - Method in class dev.metaschema.cli.processor.command.ShellCompletionCommand
- getInstance() - Static method in class dev.metaschema.cli.processor.command.CommandService
-
Get the singleton instance of the function service.
- getMessage() - Method in interface dev.metaschema.cli.processor.ExitStatus
-
Get the associated message, or
nullif there is no message. - getMessage() - Method in class dev.metaschema.cli.processor.MessageExitStatus
- getMessage() - Method in class dev.metaschema.cli.processor.NonMessageExitStatus
-
Get the associated message, or
nullif there is no message. - getName() - Method in interface dev.metaschema.cli.processor.command.ExtraArgument
-
Get the argument name.
- getName() - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Get the name of the command.
- getName() - Method in class dev.metaschema.cli.processor.command.impl.DefaultExtraArgument
- getName() - Method in class dev.metaschema.cli.processor.command.ShellCompletionCommand
- getName() - Method in enum dev.metaschema.cli.processor.command.ShellCompletionCommand.Shell
-
Get the shell name.
- getNumber() - Method in interface dev.metaschema.cli.processor.command.ExtraArgument
-
Get the allow number of arguments of this type.
- getOption() - Method in exception dev.metaschema.cli.processor.InvalidArgumentException
-
Return the option requiring an argument that wasn't provided on the command line.
- getProgramName() - Method in class dev.metaschema.cli.processor.completion.CompletionScriptGenerator
-
Get the program name.
- getStatusCode() - Method in enum dev.metaschema.cli.processor.ExitCode
-
Get the related status code for use with
System.exit(int). - getSubCommandByName(String) - Method in class dev.metaschema.cli.processor.command.AbstractParentCommand
- getSubCommandByName(String) - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Get a sub-command by it's command name.
- getSubCommands() - Method in class dev.metaschema.cli.processor.command.AbstractParentCommand
- getSubCommands() - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Get any sub-commands associated with this command.
- getTargetCommand() - Method in class dev.metaschema.cli.processor.CallingContext
-
Get the command that was triggered by the CLI arguments.
- getThrowable() - Method in class dev.metaschema.cli.processor.AbstractExitStatus
-
Get the associated throwable.
- getThrowable() - Method in interface dev.metaschema.cli.processor.ExitStatus
-
Get a throwable that is associated with this exit status.
- getTopLevelCommands() - Method in class dev.metaschema.cli.processor.CLIProcessor
-
Get the root-level commands.
- getTopLevelCommandsByName() - Method in class dev.metaschema.cli.processor.CLIProcessor
-
Get the root-level commands, mapped from name to command.
- getType() - Method in interface dev.metaschema.cli.processor.command.ExtraArgument
-
Get the type for shell completion purposes.
- getType() - Method in class dev.metaschema.cli.processor.command.impl.DefaultExtraArgument
- getVersionInfos() - Method in class dev.metaschema.cli.processor.CLIProcessor
-
Retrieve the version information for this application.
- getZshCompletion() - Method in interface dev.metaschema.cli.processor.completion.ICompletionType
-
Generate Zsh completion code for this type.
H
- handleError(ExitStatus, CommandLine, boolean) - Method in class dev.metaschema.cli.processor.CallingContext
-
Handle an error that occurred while executing the command.
- handleInvalidCommand(String) - Method in class dev.metaschema.cli.processor.CallingContext
-
Generate the help message and exit status for an invalid command using the provided message.
- HELP_OPTION - Static variable in class dev.metaschema.cli.processor.CLIProcessor
-
This option indicates if the help should be shown.
I
- ICommand - Interface in dev.metaschema.cli.processor.command
-
A command line interface command.
- ICommandExecutor - Interface in dev.metaschema.cli.processor.command
-
An abstract base class that implements the
ICommandExecutorinterface, providing common functionality for command execution implementations. - ICommandExecutor.ExecutionFunction - Interface in dev.metaschema.cli.processor.command
-
This functional interface represents a method that is used to execute a command operation.
- ICompletionType - Interface in dev.metaschema.cli.processor.completion
-
Provides shell completion code for a specific type.
- INVALID_ARGUMENTS - Enum constant in enum dev.metaschema.cli.processor.ExitCode
-
The provided argument information for a command fails to match argument use requirements.
- INVALID_COMMAND - Enum constant in enum dev.metaschema.cli.processor.ExitCode
-
A command was requested by name that doesn't exist or required arguments are missing.
- INVALID_TARGET - Enum constant in enum dev.metaschema.cli.processor.ExitCode
-
The target argument was not found or invalid.
- InvalidArgumentException - Exception in dev.metaschema.cli.processor
-
Thrown when an option argument is found to be invalid during parsing of a command-line.
- InvalidArgumentException(String) - Constructor for exception dev.metaschema.cli.processor.InvalidArgumentException
-
Generate a new exception.
- IO_ERROR - Enum constant in enum dev.metaschema.cli.processor.ExitCode
-
An error occurred while reading or writing.
- isRequired() - Method in interface dev.metaschema.cli.processor.command.ExtraArgument
-
Get if the argument is required.
- isRequired() - Method in class dev.metaschema.cli.processor.command.impl.DefaultExtraArgument
- isSubCommandRequired() - Method in class dev.metaschema.cli.processor.command.AbstractParentCommand
- isSubCommandRequired() - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Determine if this command requires the use of a sub-command.
L
- lookup(Class<?>) - Static method in class dev.metaschema.cli.processor.completion.CompletionTypeRegistry
-
Lookup the completion type for a class.
M
- main(String...) - Static method in class dev.metaschema.cli.processor.CLIProcessor
-
The main entry point for command execution.
- MessageExitStatus - Class in dev.metaschema.cli.processor
-
An
ExitStatusimplementation with an associated message. - MessageExitStatus(ExitCode, Object...) - Constructor for class dev.metaschema.cli.processor.MessageExitStatus
-
Construct a new
ExitStatusbased on an array of message arguments.
N
- newExecutor(CallingContext, CommandLine) - Method in class dev.metaschema.cli.processor.command.AbstractParentCommand
- newExecutor(CallingContext, CommandLine) - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Create a new executor for this command.
- newExecutor(CallingContext, CommandLine) - Method in class dev.metaschema.cli.processor.command.ShellCompletionCommand
- newInstance(String, boolean) - Static method in interface dev.metaschema.cli.processor.command.ExtraArgument
-
Create a new extra argument instance.
- newInstance(String, boolean, Class<?>) - Static method in interface dev.metaschema.cli.processor.command.ExtraArgument
-
Create a new extra argument instance with type information for shell completion.
- NO_COLOR_OPTION - Static variable in class dev.metaschema.cli.processor.CLIProcessor
-
This option indicates if colorized output should be disabled.
- NonMessageExitStatus - Class in dev.metaschema.cli.processor
-
An
ExitStatusimplementation that represents a status without an associated message.
O
- OK - Enum constant in enum dev.metaschema.cli.processor.ExitCode
-
The command executed without issue.
- OptionUtils - Class in dev.metaschema.cli.processor
-
A collection of utilities for handling command line options.
P
- parseOptions() - Method in class dev.metaschema.cli.processor.CallingContext
-
Parse all command line options.
- process(String...) - Method in class dev.metaschema.cli.processor.CLIProcessor
-
Process a set of CLIProcessor arguments.
- processCommand() - Method in class dev.metaschema.cli.processor.CallingContext
-
Process the command identified by the CLI arguments.
- PROCESSING_ERROR - Enum constant in enum dev.metaschema.cli.processor.ExitCode
-
Handled errors that occur during command execution.
Q
- QUIET_OPTION - Static variable in class dev.metaschema.cli.processor.CLIProcessor
-
This option indicates if non-errors should be suppressed.
R
- register(Class<?>, ICompletionType) - Static method in class dev.metaschema.cli.processor.completion.CompletionTypeRegistry
-
Register a completion type for a class.
- registerEnum(Class<E>) - Static method in class dev.metaschema.cli.processor.completion.CompletionTypeRegistry
-
Register an enum type using its constant names as completion values.
- resolveAgainstCWD(String) - Static method in class dev.metaschema.cli.processor.command.AbstractTerminalCommand
-
A utility method that can be used to resolve a URI (as a string) against the URI for the current working directory.
- resolveAgainstCWD(URI) - Static method in class dev.metaschema.cli.processor.command.AbstractTerminalCommand
-
A utility method that can be used to resolve a URI against the URI for the current working directory.
- resolveAgainstCWD(Path) - Static method in class dev.metaschema.cli.processor.command.AbstractTerminalCommand
-
A utility method that can be used to resolve a path against the current working directory.
- RUNTIME_ERROR - Enum constant in enum dev.metaschema.cli.processor.ExitCode
-
Unhandled errors that occur during command execution.
S
- setOption(Option) - Method in exception dev.metaschema.cli.processor.InvalidArgumentException
-
Assign the option requiring an argument that wasn't provided on the command line.
- ShellCompletionCommand - Class in dev.metaschema.cli.processor.command
-
A command that generates shell completion scripts for Bash and Zsh.
- ShellCompletionCommand() - Constructor for class dev.metaschema.cli.processor.command.ShellCompletionCommand
- ShellCompletionCommand.Shell - Enum in dev.metaschema.cli.processor.command
-
Supported shell types.
- SHOW_STACK_TRACE_OPTION - Static variable in class dev.metaschema.cli.processor.CLIProcessor
-
This option indicates if a strack trace should be shown for an error
ExitStatus. - showHelp() - Method in class dev.metaschema.cli.processor.CallingContext
-
Output the help text to the console.
- showVersion() - Method in class dev.metaschema.cli.processor.CLIProcessor
-
Output version information.
T
- toArgument(Option) - Static method in class dev.metaschema.cli.processor.OptionUtils
-
Generate the argument text for the given option.
- toExitStatus() - Method in exception dev.metaschema.cli.processor.command.CommandExecutionException
-
Generate an
ExitStatusbased on this exception.
U
- using(CallingContext, CommandLine, ICommandExecutor.ExecutionFunction) - Static method in interface dev.metaschema.cli.processor.command.ICommandExecutor
-
Create a new command executor.
V
- validateCalledCommands(CommandLine) - Method in class dev.metaschema.cli.processor.CallingContext
-
Validate options for all called commands in the chain.
- validateExtraArguments(CallingContext, CommandLine) - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Validates that the provided extra arguments meet expectations.
- validateExtraArguments(CommandLine) - Method in class dev.metaschema.cli.processor.CallingContext
-
Validate extra arguments for the target command.
- validateOptions(CallingContext, CommandLine) - Method in interface dev.metaschema.cli.processor.command.ICommand
-
Validate the options provided on the command line based on what is required for this command.
- valueOf(String) - Static method in enum dev.metaschema.cli.processor.command.ShellCompletionCommand.Shell
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum dev.metaschema.cli.processor.completion.CompletionScriptGenerator.Shell
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum dev.metaschema.cli.processor.ExitCode
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum dev.metaschema.cli.processor.command.ShellCompletionCommand.Shell
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum dev.metaschema.cli.processor.completion.CompletionScriptGenerator.Shell
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum dev.metaschema.cli.processor.ExitCode
-
Returns an array containing the constants of this enum type, in the order they are declared.
- VERSION_OPTION - Static variable in class dev.metaschema.cli.processor.CLIProcessor
-
This option indicates if the version information should be shown.
W
- withThrowable(Throwable) - Method in class dev.metaschema.cli.processor.AbstractExitStatus
- withThrowable(Throwable) - Method in interface dev.metaschema.cli.processor.ExitStatus
-
Associate a throwable with the exit status.
Z
- ZSH - Enum constant in enum dev.metaschema.cli.processor.command.ShellCompletionCommand.Shell
-
Zsh shell.
- ZSH - Enum constant in enum dev.metaschema.cli.processor.completion.CompletionScriptGenerator.Shell
-
Zsh shell.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form