protected static enum Opt
{
- BOOLEAN, STRING, UNARY, MULTI, LINKED, NODUPLICATEVALUES, BOOTSTRAP,
- GLOB, NOACTION, ALLOWSUBSTITUTIONS, PRIVATE
+ BOOLEAN, // This Arg can be specified as --arg or --noarg to give true or
+ // false. A default can be given with setOptions(bool, Opt....).
+ // Use ArgParser.isSet(Arg) to see if this arg was not specified.
+ STRING, // This Arg can accept a value either through --arg=value or --arg
+ // value.
+ UNARY, // This Arg is a boolean value, true if present, false if not. Like
+ // BOOLEAN but without the --noarg option.
+ MULTI, // This Arg can be specified multiple times. Multiple values are
+ // stored in the ArgValuesMap (along with their positional index) for
+ // each linkedId.
+ LINKED, // This Arg can be linked to others through a --arg[linkedId] or
+ // --arg[linkedId]=value. If no linkedId is specified then the
+ // current default linkedId will be used.
+ NODUPLICATEVALUES, // This Arg can only have one value (per linkedId). The
+ // first value will be used and subsequent values ignored
+ // with a warning.
+ BOOTSTRAP, // This Arg value(s) can be determined at an earlier stage than
+ // non-BOOTSTRAP Args. Substitutions do not happen in BOOTSTRAP
+ // Args and they cannot be linked or contain SubVals. See
+ // jalview.bin.argparser.BootstrapArgs.
+ GLOB, // This Arg can expand wildcard filename "globs" (e.g.
+ // path/*/filename*). If the Arg value is given as --arg filename*
+ // then the shell will have expanded the glob already, but if
+ // specified as --arg=filename* then the Java glob expansion method
+ // will be used (see FileUtils.getFilenamesFromGlob()). Note that this
+ // might be different from the shell expansion rules.
+ NOACTION, // This Arg does not perform a data task, usually used to control
+ // flow in ArgParser.parse(args).
+ ALLOWSUBSTITUTIONS, // This Arg allows substitutions in its linkedId,
+ // SubVals and values.
+ PRIVATE // This Arg is used internally, and cannot be specified by the user.
}
static
SETARGFILE.setOptions(Opt.STRING, Opt.MULTI, Opt.PRIVATE, Opt.NOACTION);
UNSETARGFILE.setOptions(Opt.MULTI, Opt.PRIVATE, Opt.NOACTION);
WEBSERVICEDISCOVERY.setOptions(Opt.BOOLEAN, Opt.BOOTSTRAP);
- // Opt.BOOTSTRAP args are parsed (not linked with no SubVals so using a
- // simplified parser, see jalview.bin.argparser.BootstrapArgs)
- // before a full parse of arguments and so can be accessible at an earlier
- // stage to (e.g.) set debug log level, provide a props file (that might set
- // log level), run headlessly, read an argfile instead of other args.
}
private final String[] argNames;