anchor.diff:  }
   
   assert 3 == new CommandLine(new Gesture()).execute();
  -```
  +----
  +
  +.Kotlin
  +[source,kotlin,role="secondary"]
  +----
  +@Command(name = "wave")
  +class Gesture : Runnable, IExitCodeGenerator {
  +
  +    override fun run() {
  +        println("wave")
  +    }
  +
  +    override fun getExitCode(): Int {
  +        return 3
  +    }
  +}
  +
  +assert(3 == CommandLine(Gesture()).execute())
  +----
   
   === Exception Exit Codes
   
   By default, the `execute` method returns `CommandLine.ExitCode.OK` (`0`) on success, `CommandLine.ExitCode.SOFTWARE` (`1`) when an exception occurred in the Runnable, Callable or command method, and `CommandLine.ExitCode.USAGE` (`2`) for invalid input. (These are common values according to https://stackoverflow.com/questions/1101957/are-there-any-standard-exit-status-codes-in-linux/40484670#40484670[this StackOverflow answer]). This can be customized with the `@Command` annotation. For example:
   
  -```java
  +.Java / Kotlin
  +[source,java,role="primary"]
  +----
   @Command(exitCodeOnInvalidInput = 123,
      exitCodeOnExecutionException = 456)
  -```
  +----
   
   Additionally, applications can configure a `IExitCodeExceptionMapper` to map a specific exception to an exit code:
   
  -```java
  +.Java
  +[source,java,role="primary"]
  +----
   class MyMapper implements IExitCodeExceptionMapper {
       @Override
       public int getExitCode(Throwable t) {
  
positive.code: 
  ==== Customizing Output Streams and ANSI settings
  
  .Before:
  
  ```java
  PrintStream out = // output stream for user-requested help
  PrintStream err = // output stream for error messages
  Ansi ansi = // to use ANSI colors and styles or not
  CommandLine.run(new MyRunnable(), out, err, ansi, args);
  ```
  
  .After:
  ```java
  PrintWriter out = // output stream for user-requested help
  PrintWriter err = // output stream for error messages
  Ansi ansi = // to use ANSI colors and styles or not
  
negative.code:         .setColorScheme(Help.defaultColorScheme(ansi));
  
  int exitCode = cmd.execute(args);
  ----
  
  .Kotlin
  [source,kotlin,role="secondary"]
  ----
  var out: PrintWriter = // output stream for user-requested help
  var err: PrintWriter = // output stream for error messages
  val ansi: Ansi = // to use ANSI colors and styles or not
  
  val cmd = CommandLine(MyRunnable())
          .setOut(out)
          .setErr(err)
          .setColorScheme(Help.defaultColorScheme(ansi));
  
  val exitCode = cmd.execute(*args)
  ----
  
  ==== Return Value from Callable or Method
  
  