org.neovera.jdiablo.annotation
Annotation Type Option


@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @interface Option

Use this annotation against properties in your Launchable class (or Environment) to define command line options accepted by the program.


Required Element Summary
 String description
           
 String shortOption
           
 
Optional Element Summary
 String argName
           
 int args
           
 boolean hasArgs
           
 String longOption
           
 int optionalArgs
           
 boolean required
           
 char valueSeparator
           
 

Element Detail

shortOption

public abstract String shortOption
Returns:
Usually a single character (occasionally two characters) option that is specified with a single hyphen.

description

public abstract String description
Returns:
Description of the option. This is echoed in the help output.

longOption

public abstract String longOption
Returns:
A more descriptive option in camelCase specified with two hyphens in the command line.
Default:
""

required

public abstract boolean required
Returns:
if true the program will not execute without this option, if false the option is not required.
Default:
false

args

public abstract int args
Returns:
Number of arguments. Defaults to zero.
Default:
0

hasArgs

public abstract boolean hasArgs
Returns:
Set to true to specify unlimited number of arguments (as opposed to args that specifies a specific number).
Default:
false

optionalArgs

public abstract int optionalArgs
Returns:
This option can have the specified number of optional arguments.
Default:
0

argName

public abstract String argName
Returns:
Name of the argument. Used in command line help display.
Default:
""

valueSeparator

public abstract char valueSeparator
Returns:
Defines character to use to separate multi-valued arguments.
Default:
32


Copyright © 2014 Neovera Inc.. All rights reserved.