public static void acceptsFormat(OptionParser parser) {
        parser.accepts(OPT_FORMAT, "format of key or entry, could be hex, json or binary")
              .withRequiredArg()
              .describedAs("hex | json | binary")
              .ofType(String.class);
    }
public static void acceptsFormat ( OptionParser parser ) { parser . accepts ( OPT_FORMAT , "format of key or entry, could be hex, json or binary" ) . withRequiredArg ( ) . describedAs ( "hex | json | binary" ) . ofType ( String . class ) ; }
Adds OPT_FORMAT option to OptionParser, with one argument.

@param parser OptionParser to be modified
@param required Tells if this option is required or optional