Package readycli
Enum Command.ExitCause
java.lang.Object
java.lang.Enum<Command.ExitCause>
readycli.Command.ExitCause
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Command.ExitCause>
,java.lang.constant.Constable
- Enclosing class:
- Command
public static enum Command.ExitCause extends java.lang.Enum<Command.ExitCause>
Specify the cause of the exit from command execution. The command already
reports all the errors on the output stream passed to the
Command.execute(List, PrintStream, InputStream)
method.- Author:
- Salvatore Giampa'
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description ERROR_COMMAND_EXECUTOR
Terminated in error, because the command commandExecutor thrown an exceptionERROR_COMMAND_NOT_IMPLEMENTED
Terminated in error, because the command was not implemented (i.e. the command commandExecutor was set to null)ERROR_EXPECTED_ARGUMENT
Terminated in error, because an expected required argument was not specifiedERROR_EXPECTED_OPTION_PARAMETER
Terminated in error, because an expected option parameter was not specifiedERROR_UNEXPECTED_OPTION
Terminated in error, because an unexpected option name was specifiedHELP_FLAG
The help flag was specifiedSUCCESS
The command successfully terminated -
Method Summary
Modifier and Type Method Description int
getExitCode()
static Command.ExitCause
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Command.ExitCause[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
The command successfully terminated -
HELP_FLAG
The help flag was specified -
ERROR_EXPECTED_ARGUMENT
Terminated in error, because an expected required argument was not specified -
ERROR_EXPECTED_OPTION_PARAMETER
Terminated in error, because an expected option parameter was not specified -
ERROR_UNEXPECTED_OPTION
Terminated in error, because an unexpected option name was specified -
ERROR_COMMAND_NOT_IMPLEMENTED
Terminated in error, because the command was not implemented (i.e. the command commandExecutor was set to null) -
ERROR_COMMAND_EXECUTOR
Terminated in error, because the command commandExecutor thrown an exception
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getExitCode
public int getExitCode()
-