| Package | Description |
|---|---|
| net.dpml.cli |
Commandline modeling and parsing utilities.
|
| net.dpml.cli.builder |
Helpers supporting the construction of a commandline model.
|
| net.dpml.cli.commandline |
Commandline implementation.
|
| net.dpml.cli.option |
Options implementation include command, group, switch and property abstractions.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
Argument
An Option that can process values passed on the command line in the form
"--file README".
|
interface |
Group
An Option representing a choice or group of Options in the form "-a|-b|-c".
|
interface |
Parent
An Option that can have an argument and/or group of child Options in the form
"-f <arg> [-a|-b|-c]".
|
| Modifier and Type | Method and Description |
|---|---|
Option |
Option.findOption(java.lang.String trigger)
Recursively searches for an option with the supplied trigger.
|
Option |
HelpLine.getOption() |
Option |
OptionException.getOption()
Gets the Option the exception relates to
|
Option |
CommandLine.getOption(java.lang.String trigger)
Finds the Option with the specified trigger
|
| Modifier and Type | Method and Description |
|---|---|
void |
WriteableCommandLine.addOption(Option option)
Adds an Option to the CommandLine
|
void |
WriteableCommandLine.addSwitch(Option option,
boolean value)
Adds a switch value to an Option in the CommandLine.
|
void |
WriteableCommandLine.addValue(Option option,
java.lang.Object value)
Adds a value to an Option in the CommandLine.
|
void |
Argument.defaultValues(WriteableCommandLine commandLine,
Option option)
Adds defaults to a CommandLine.
|
int |
CommandLine.getOptionCount(Option option)
Retrieves the number of times the specified Option appeared in this
CommandLine
|
java.lang.Boolean |
CommandLine.getSwitch(Option option)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Boolean |
CommandLine.getSwitch(Option option,
java.lang.Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Object |
CommandLine.getValue(Option option)
Retrieves the single Argument value associated with the specified Option
|
java.lang.Object |
CommandLine.getValue(Option option,
java.lang.Object defaultValue)
Retrieves the single Argument value associated with the specified Option
|
java.util.List |
CommandLine.getValues(Option option)
Retrieves the Argument values associated with the specified Option
|
java.util.List |
CommandLine.getValues(Option option,
java.util.List defaultValues)
Retrieves the Argument values associated with the specified Option
|
boolean |
CommandLine.hasOption(Option option)
Detects the presence of an option in this CommandLine.
|
void |
Argument.processValues(WriteableCommandLine commandLine,
java.util.ListIterator args,
Option option)
Processes the "README" style element of the argument.
|
void |
WriteableCommandLine.setDefaultSwitch(Option option,
java.lang.Boolean defaultSwitch)
Sets the default state for a Switch in the CommandLine.
|
void |
WriteableCommandLine.setDefaultValues(Option option,
java.util.List defaultValues)
Sets the default values for an Option in the CommandLine
|
void |
Argument.validate(WriteableCommandLine commandLine,
Option option)
Performs any necessary validation on the values added to the
CommandLine.
|
| Constructor and Description |
|---|
OptionException(Option option)
Creates a new OptionException.
|
OptionException(Option option,
java.lang.String messageKey)
Creates a new OptionException.
|
OptionException(Option option,
java.lang.String messageKey,
java.lang.String value)
Creates a new OptionException.
|
| Modifier and Type | Method and Description |
|---|---|
Option |
PatternBuilder.create()
Creates a new Option instance.
|
| Modifier and Type | Method and Description |
|---|---|
GroupBuilder |
GroupBuilder.withOption(Option option)
Add this option to the group
|
| Modifier and Type | Method and Description |
|---|---|
Option |
WriteableCommandLineImpl.getOption(java.lang.String trigger)
Finds the Option with the specified trigger
|
Option |
PropertiesCommandLine.getOption(java.lang.String trigger)
Finds the Option with the specified trigger
|
Option |
PreferencesCommandLine.getOption(java.lang.String trigger)
Finds the Option with the specified trigger
|
Option |
DefaultingCommandLine.getOption(java.lang.String trigger)
Finds the Option with the specified trigger
|
| Modifier and Type | Method and Description |
|---|---|
void |
WriteableCommandLineImpl.addOption(Option option)
Add an option.
|
void |
WriteableCommandLineImpl.addSwitch(Option option,
boolean value)
Add a switch.
|
void |
WriteableCommandLineImpl.addValue(Option option,
java.lang.Object value)
Add an option.
|
int |
CommandLineImpl.getOptionCount(Option option)
Retrieves the number of times the specified Option appeared in this
CommandLine
|
java.lang.Boolean |
CommandLineImpl.getSwitch(Option option)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Boolean |
WriteableCommandLineImpl.getSwitch(Option option,
java.lang.Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Boolean |
PropertiesCommandLine.getSwitch(Option option,
java.lang.Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Boolean |
PreferencesCommandLine.getSwitch(Option option,
java.lang.Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Boolean |
DefaultingCommandLine.getSwitch(Option option,
java.lang.Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Object |
CommandLineImpl.getValue(Option option)
Retrieves the single Argument value associated with the specified Option
|
java.lang.Object |
CommandLineImpl.getValue(Option option,
java.lang.Object defaultValue)
Retrieves the single Argument value associated with the specified Option
|
java.util.List |
CommandLineImpl.getValues(Option option)
Retrieves the Argument values associated with the specified Option
|
java.util.List |
WriteableCommandLineImpl.getValues(Option option,
java.util.List defaultValues)
Retrieves the Argument values associated with the specified Option
|
java.util.List |
PropertiesCommandLine.getValues(Option option,
java.util.List defaultValues)
Retrieves the Argument values associated with the specified Option
|
java.util.List |
PreferencesCommandLine.getValues(Option option,
java.util.List defaultValues)
Retrieves the Argument values associated with the specified Option
|
java.util.List |
DefaultingCommandLine.getValues(Option option,
java.util.List defaultValues)
Retrieves the Argument values associated with the specified Option
|
boolean |
WriteableCommandLineImpl.hasOption(Option option)
Detects the presence of an option in this CommandLine.
|
boolean |
PropertiesCommandLine.hasOption(Option option)
Detects the presence of an option in this CommandLine.
|
boolean |
PreferencesCommandLine.hasOption(Option option)
Detects the presence of an option in this CommandLine.
|
boolean |
DefaultingCommandLine.hasOption(Option option)
Detects the presence of an option in this CommandLine.
|
void |
WriteableCommandLineImpl.setDefaultSwitch(Option option,
java.lang.Boolean defaultSwitch)
Set default switch.
|
void |
WriteableCommandLineImpl.setDefaultValues(Option option,
java.util.List defaults)
Set default values.
|
void |
Parser.setHelpOption(Option helpOption)
Sets the help option to use with the simplified parsing.
|
| Constructor and Description |
|---|
PreferencesCommandLine(Option root,
java.util.prefs.Preferences preferences)
Creates a new PreferencesCommandLine using the specified root Option and
Preferences node.
|
PreferencesCommandLine(Option root,
java.util.prefs.Preferences preferences,
char separator)
Creates a new PreferencesCommandLine using the specified root Option,
Preferences node and value separator.
|
PropertiesCommandLine(Option root,
java.util.Properties properties)
Creates a new PropertiesCommandLine using the specified root Option,
Properties instance.
|
PropertiesCommandLine(Option root,
java.util.Properties properties,
char separator)
Creates a new PropertiesCommandLine using the specified root Option,
Properties instance and value separator.
|
WriteableCommandLineImpl(Option rootOption,
java.util.List arguments)
Creates a new WriteableCommandLineImpl rooted on the specified Option, to
hold the parsed arguments.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ArgumentImpl
An implementation of an Argument.
|
class |
Command
Represents a cvs "update" style command line option.
|
class |
DefaultOption
A Parent implementation representing normal options.
|
class |
GroupImpl
An implementation of Group
|
class |
OptionImpl
A base implementation of Option providing limited ground work for further
Option implementations.
|
class |
ParentImpl
A base implementation of Parent providing limited ground work for further
Parent implementations.
|
class |
PropertyOption
Handles the java style "-Dprop=value" opions
|
class |
SourceDestArgument
An Argument implementation that allows a variable size Argument to precede a
fixed size argument.
|
class |
Switch
A Parent implementation representing normal switch options.
|
| Modifier and Type | Method and Description |
|---|---|
Option |
OptionImpl.findOption(java.lang.String trigger)
Recursively searches for an option with the supplied trigger.
|
Option |
ParentImpl.findOption(java.lang.String trigger)
Recursively searches for an option with the supplied trigger.
|
Option |
GroupImpl.findOption(java.lang.String trigger)
Recursively searches for an option with the supplied trigger.
|
Option |
HelpLineImpl.getOption() |
| Modifier and Type | Method and Description |
|---|---|
void |
ArgumentImpl.defaultValues(WriteableCommandLine commandLine,
Option option)
Adds defaults to a CommandLine.
|
void |
ArgumentImpl.processValues(WriteableCommandLine commandLine,
java.util.ListIterator arguments,
Option option)
Processes the "README" style element of the argument.
|
void |
SourceDestArgument.validate(WriteableCommandLine commandLine,
Option option)
Checks that the supplied CommandLine is valid with respect to the
suppled option.
|
void |
ArgumentImpl.validate(WriteableCommandLine commandLine,
Option option)
Performs any necessary validation on the values added to the
CommandLine.
|
| Constructor and Description |
|---|
HelpLineImpl(Option option,
int indent)
Creates a new HelpLineImpl to represent a particular Option in the online
help.
|