package examples.dustin.commandline.jbock;

import net.jbock.CommandLineArguments;
import net.jbock.Parameter;

import java.nio.file.Path;

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

   @CommandLineArguments
   abstract static class Arguments
   {

      /**
       * Verbosity enabled?
       */
      @Parameter(flag = true, shortName = 'v', longName = "verbose")
      abstract boolean verbose();

      /**
       * File name and path
       */
      @Parameter(shortName = 'f', longName = "file")
      abstract Path file();
   }

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

@@ -37,16 +37,53 @@
 jbock;%0A%0A
+import static java.lang.System.out;%0A%0A
 import n
@@ -113,16 +113,16 @@
 uments;%0A
-
 import n
@@ -158,21 +158,21 @@
 ava.
-nio.file.Path
+util.Optional
 ;%0A%0A/
@@ -423,21 +423,8 @@
 ter(
-flag = true, 
 shor
@@ -613,12 +613,14 @@
 act 
-Path
+String
  fil

update to jbock 2.8.2