org.kohsuke.args4j
Annotation Type Argument


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

Argument of the command line. This works mostly like Option except the following differences.

  1. Arguments have an index about their relative position on the command line.

Author:
Kohsuke Kawaguchi, Mark Sinke

Optional Element Summary
 Class<? extends OptionHandler> handler
          See Option.handler().
 int index
          Position of the argument.
 String metaVar
          See Option.metaVar().
 boolean multiValued
          See Option.multiValued().
 boolean required
          See Option.required().
 String usage
          See Option.usage().
 

usage

public abstract String usage
See Option.usage().

Default:
""

metaVar

public abstract String metaVar
See Option.metaVar().

Default:
""

required

public abstract boolean required
See Option.required().

Default:
false

handler

public abstract Class<? extends OptionHandler> handler
See Option.handler().

Default:
org.kohsuke.args4j.spi.OptionHandler.class

index

public abstract int index
Position of the argument.

If you define multiple single value properties to bind to arguments, they should have index=0, index=1, index=2, ... and so on.

Multi value properties bound to arguments must be always the last entry.

Default:
0

multiValued

public abstract boolean multiValued
See Option.multiValued().

Default:
false


Copyright © 2003-2011 Kohsuke Kawaguchi. All Rights Reserved.