package examples.dustin.commandline.jbock;

import net.jbock.Command;
import net.jbock.Option;

/**
 * Demonstrates use of jbock 3.4 to process command-line
 * arguments in a Java application.
 */
public class Main
{

   @Command
   abstract static class Arguments
   {

      /**
       * Verbosity enabled?
       */
      @Option(value = "verbose", mnemonic = 'v')
      abstract boolean verbose();

      /**
       * File name and path
       */
      @Option(value = "file", mnemonic = 'f')
      abstract String file();
   }

   public static void main(String[] arguments)
   {
      Arguments args = new Main_Arguments_Parser().parseOrExit(arguments);
      System.out.println("The file '" + args.file() + "' was provided and verbosity is set to '" + args.verbose() + "'.");
   }
}

@@ -37,16 +37,43 @@
 jbock;%0A%0A
+import java.util.Optional;%0A
 import n
@@ -153,11 +153,11 @@
 ock 
-3.4
+4.2
  to 
@@ -357,41 +357,35 @@
 ion(
-value = %22verbose%22, mnemonic = 'v'
+names = %7B%22-v%22, %22--verbose%22%7D
 )%0A  
@@ -483,38 +483,32 @@
 ion(
-value = %22file%22, mnemonic = 'f'
+names = %7B%22-f%22, %22--file%22%7D
 )%0A  
@@ -520,22 +520,32 @@
 bstract 
+Optional%3C
 String
+%3E
  file();

update jbock usage to version 3.2