Package org.kohsuke.args4j

## Class OptionDef

- java.lang.Object
- - org.kohsuke.args4j.OptionDef

Direct Known Subclasses:
  `NamedOptionDef`

    public class OptionDef
    extends java.lang.Object

Run-time copy of the Option or Argument annotation. By definition, unnamed options are arguments (and instances of this class). Named options are actually a subclass.

Author:
  Mark Sinke

### Constructor Summary

Constructors
`protected` `OptionDef​(java.lang.String usage, java.lang.String metaVar, boolean required, boolean help, boolean hidden, java.lang.Class<? extends OptionHandler> handler, boolean multiValued)`
`` `OptionDef​(Argument a, boolean forceMultiValued)`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.Class<? extends OptionHandler>` `handler()`
`boolean` `help()`
`boolean` `hidden()` Value from `Option.hidden()` or `Argument.hidden()`
`boolean` `isArgument()`
`boolean` `isMultiValued()`
`java.lang.String` `metaVar()`
`boolean` `required()`
`java.lang.String` `toString()`
`java.lang.String` `usage()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### OptionDef

    public OptionDef​(Argument a,
                     boolean forceMultiValued)

#### OptionDef

    protected OptionDef​(java.lang.String usage,
                        java.lang.String metaVar,
                        boolean required,
                        boolean help,
                        boolean hidden,
                        java.lang.Class<? extends OptionHandler> handler,
                        boolean multiValued)

### Method Detail

#### usage

    public java.lang.String usage()

#### metaVar

    public java.lang.String metaVar()

#### required

    public boolean required()

#### help

    public boolean help()

#### hidden

    public boolean hidden()

Value from `Option.hidden()` or `Argument.hidden()`

#### handler

    public java.lang.Class<? extends OptionHandler> handler()

#### isMultiValued

    public boolean isMultiValued()

#### isArgument

    public boolean isArgument()

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`