org.geotoolkit.console
Annotation Type Option


@Documented
@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface Option

Annotates a field to be assigned from values given on the command line. This annotation contains non-localized informations like the name or whatever the option is mandatory. This annotation does not contain the description to be printed when the user ask for help because such description is local-dependent. The description must be provided in a properties file under the following rules:

Since:
2.5
Version:
3.00
Author:
Martin Desruisseaux (Geomatys)
Module:
utility/geotk-utility (download)    View source code for this class

Optional Element Summary
 String[] examples
          Examples of usage of this option.
 boolean mandatory
          true if this option is mandatory.
 String name
          The argument name.
 

name

public abstract String name
The argument name. The default is the same name than the field.

Returns:
The argument name, or "" for the default.
Default:
""

mandatory

public abstract boolean mandatory
true if this option is mandatory. Options are optional by default.

Returns:
Whatever this option is mandatory or optional.
Default:
false

examples

public abstract String[] examples
Examples of usage of this option.

Returns:
Examples of usage of this option, or an empty array for none.
Default:
{}


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.