MCPcopy
hub / github.com/remkop/picocli / IExitCodeGenerator

Interface IExitCodeGenerator

src/main/java/picocli/CommandLine.java:1196–1201  ·  view source on GitHub ↗

@Command-annotated classes can implement this interface to specify an exit code that will be returned from the #execute(String...) execute method when the command is successfully invoked. Example usage: @Command class MyCommand implements Runnable, IExitCodeGenerat

Source from the content-addressed store, hash-verified

1194 * @since 4.0
1195 */
1196 public interface IExitCodeGenerator {
1197 /** Returns the exit code that should be returned from the {@link #execute(String...) execute} method.
1198 * @return the exit code
1199 */
1200 int getExitCode();
1201 }
1202 /** Interface that provides the appropriate exit code that will be returned from the {@link #execute(String...) execute}
1203 * method for an exception that occurred during parsing or while invoking the command's Runnable, Callable, or Method.
1204 * <p>Example usage:</p>

Callers 4

mappedExitCodeMethod · 0.65
mappedExitCodeMethod · 0.65
mappedExitCodeMethod · 0.65
resolveExitCodeMethod · 0.65

Implementers 15

CustomExitCodeGeneratorpicocli-examples/src/main/java/picocli
Appsrc/test/java/picocli/ExecuteTest.java
ExitCodeGensrc/test/java/picocli/ExecuteTest.java
Cmdsrc/test/java/picocli/ExecuteTest.java
MixinTestSubCommandsrc/test/java/picocli/RepeatableSubcom
ExitCodeExceptionMapperDemopicocli-examples/src/main/java/picocli
Appsrc/test/java/picocli/OptionMethodImpl
SubcommandTestssrc/test/java/picocli/SubcommandTests.
ExecuteTestsrc/test/java/picocli/ExecuteTest.java
Cmdsrc/test/java/picocli/ArityTest.java
RepeatableSubcommandsTestsrc/test/java/picocli/RepeatableSubcom
CommandLineExecutionsrc/test/java/picocli/test/CommandLine

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…