Top Description Fields Methods
org.kohsuke.args4j

public Interface OptionHandlerFilter

Known Direct Implementers
org.kohsuke.args4j.ExampleMode
Imports
org.kohsuke.args4j.spi.OptionHandler, java.io.Writer, java.util.ResourceBundle

Selects OptionHandler.

For example, we use this to let the caller specify which options are printed, and which ones aren't.

Author
Kohsuke Kawaguchi
See Also
CmdLineParser#printExample(OptionHandlerFilter), CmdLineParser#printUsage(Writer, ResourceBundle, OptionHandlerFilter)

Field Summary

Modifier and TypeField and Description
public static final OptionHandlerFilter
ALL

Print all defined options in the example.

public static final OptionHandlerFilter
PUBLIC

Print all non-hidden options.

public static final OptionHandlerFilter
REQUIRED

Print all required options.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true to choose this option, false to ignore/discard/disregard it.
select
(OptionHandler<T>
Never null. Internally options (like -r) and arguments (others) are treated uniformly as OptionHandler. See OptionDef#isArgument() to distinguish them.
o
)

Field Detail

ALLback to summary
public static final OptionHandlerFilter ALL

Print all defined options in the example.

PUBLICback to summary
public static final OptionHandlerFilter PUBLIC

Print all non-hidden options.

This would only be useful with a small number of options.

REQUIREDback to summary
public static final OptionHandlerFilter REQUIRED

Print all required options.

Method Detail

selectback to summary
public boolean select(OptionHandler<T> o)
Parameters
o:OptionHandler<T>

Never null. Internally options (like -r) and arguments (others) are treated uniformly as OptionHandler. See OptionDef#isArgument() to distinguish them.

Returns:boolean

true to choose this option, false to ignore/discard/disregard it.