com.beust.jcommander
Annotation Type Parameter


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface Parameter


Optional Element Summary
 int arity
          How many parameter values this parameter will consume.
 String description
          A description of this option.
 String descriptionKey
          The key used to find the string in the message bundle.
 String[] names
          An array of allowed command line parameters (e.g.
 boolean required
          Whether this option is required.
 

names

public abstract String[] names
An array of allowed command line parameters (e.g. "-d", "--outputdir", etc...). If this attribute is omitted, the field it's annotating will receive all the unparsed options. There can only be at most one such annotation.

Default:
{}

description

public abstract String description
A description of this option.

Default:
""

required

public abstract boolean required
Whether this option is required.

Default:
false

descriptionKey

public abstract String descriptionKey
The key used to find the string in the message bundle.

Default:
""

arity

public abstract int arity
How many parameter values this parameter will consume. For example, an arity of 2 will allow "-pair value1 value2".

Default:
-1


Copyright © 2010. All Rights Reserved.