package examples.dustin.commandline.jbock;

import net.jbock.CommandLineArguments;
import net.jbock.Description;
import net.jbock.LongName;
import net.jbock.ShortName;

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

   @CommandLineArguments
   abstract static class Arguments
   {

      @ShortName('v') @LongName("verbose") @Description("Verbosity enabled?")
      abstract boolean verbose();

      @ShortName('f') @LongName("file") @Description("File name and path")
      abstract String 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() + "'."),
   }
}

@@ -97,74 +97,45 @@
 ock.
-Description;%0Aimport net.jbock.LongName;%0Aimport net.jbock.ShortName
+Parameter;%0A%0Aimport java.nio.file.Path
 ;%0A%0A/
@@ -327,34 +327,108 @@
     
-@ShortName('v') @L
+/**%0A       * Verbosity enabled?%0A       */%0A      @Parameter(flag = true, shortName = 'v', l
 ongName
-(
+ = 
 %22ver
@@ -437,43 +437,8 @@
 se%22)
- @Description(%22Verbosity enabled?%22)
 %0A   
@@ -479,76 +479,102 @@
     
-@ShortName('f') @L
+/**%0A       * File name and path%0A       */%0A      @Parameter(shortName = 'f', l
 ongName
-(
+ = 
 %22file%22)
- @Description(%22File name and path%22)
 %0A   
@@ -585,22 +585,20 @@
 bstract 
-String
+Path
  file();
@@ -855,17 +855,17 @@
  + %22'.%22)
-,
+;
 %0A   %7D%0A%7D%0A

update to jbock 2.6.0