com.neeve.cli.annotations
Annotation Type Argument


@Retention(value=RUNTIME)
@Target(value={FIELD,PARAMETER})
public @interface Argument

Defines an argument that can be provided after the command options. Arguments can be defined as not required so long as they are not followed (according to the position attribute) by any required arguments.


Required Element Summary
 String name
          A short name of for the argument.
 int position
          The argument position on the command line.
 
Optional Element Summary
 String defaultValue
          The argument's default value.
 String description
          A brief description desribing what should be supplied for this argument.
 String displayName
          Returns a display name for the argument.
 boolean required
          It is illegal to position a required argument after an optional one.
 String[] validOptions
          Can be specified to limit the valid options.
 

Element Detail

name

public abstract String name
A short name of for the argument.

This is a short name that should contain no spaces.

Returns:
The short name of the argument

position

public abstract int position
The argument position on the command line.

Agument positions start at 1.

Returns:
Specifies the order of the argument relative to others.

displayName

public abstract String displayName
Returns a display name for the argument.

This value can be used by user interfaces in place of the actual argument name. When this value is omitted, the name() should be used.

Returns:
A short, friendly display name for the argument.
Default:
""

description

public abstract String description
A brief description desribing what should be supplied for this argument.

Returns:
Description for the argument
Default:
""

defaultValue

public abstract String defaultValue
The argument's default value.

Returns:
The argument's default value
Default:
""

required

public abstract boolean required
It is illegal to position a required argument after an optional one.

Returns:
Whether or not the argument is required
Default:
true

validOptions

public abstract String[] validOptions
Can be specified to limit the valid options.

Returns:
The valid options.
Default:
{}


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.