|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.dpml.cli.commandline.CommandLineImpl
public abstract class CommandLineImpl
Instances of CommandLine represent a command line that has been processed according to the definition supplied to the parser.
| Constructor Summary | |
|---|---|
CommandLineImpl()
|
|
| Method Summary | |
|---|---|
int |
getOptionCount(Option option)
Retrieves the number of times the specified Option appeared in this CommandLine |
int |
getOptionCount(String trigger)
Retrieves the number of times the specified Option appeared in this CommandLine |
String |
getProperty(String property)
Retrieves the value associated with the specified property |
Boolean |
getSwitch(Option option)
Retrieves the Boolean value associated with the specified Switch |
Boolean |
getSwitch(String trigger)
Retrieves the Boolean value associated with the specified Switch |
Boolean |
getSwitch(String trigger,
Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch |
Object |
getValue(Option option)
Retrieves the single Argument value associated with the specified Option |
Object |
getValue(Option option,
Object defaultValue)
Retrieves the single Argument value associated with the specified Option |
Object |
getValue(String trigger)
Retrieves the single Argument value associated with the specified Option |
Object |
getValue(String trigger,
Object defaultValue)
Retrieves the single Argument value associated with the specified Option |
List |
getValues(Option option)
Retrieves the Argument values associated with the specified Option |
List |
getValues(String trigger)
Retrieves the Argument values associated with the specified Option |
List |
getValues(String trigger,
List defaultValues)
Retrieves the Argument values associated with the specified Option |
boolean |
hasOption(String trigger)
Detects the presence of an option with the specified trigger in this CommandLine. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.dpml.cli.CommandLine |
|---|
getOption, getOptions, getOptionTriggers, getProperties, getProperty, getSwitch, getValues, hasOption |
| Constructor Detail |
|---|
public CommandLineImpl()
| Method Detail |
|---|
public final boolean hasOption(String trigger)
hasOption in interface CommandLinetrigger - the trigger to search for
public final List getValues(String trigger)
getValues in interface CommandLinetrigger - a trigger used to lookup the Option
public final List getValues(String trigger,
List defaultValues)
getValues in interface CommandLinetrigger - a trigger used to lookup the OptiondefaultValues - the result to return if no values are found
public final List getValues(Option option)
getValues in interface CommandLineoption - the Option associated with the values
public final Object getValue(String trigger)
throws IllegalStateException
getValue in interface CommandLinetrigger - a trigger used to lookup the Option
IllegalStateException - if more than one values are found
public final Object getValue(String trigger,
Object defaultValue)
throws IllegalStateException
getValue in interface CommandLinetrigger - a trigger used to lookup the OptiondefaultValue - the result to use if no values are found
IllegalStateException - if more than one values are found
public final Object getValue(Option option)
throws IllegalStateException
getValue in interface CommandLineoption - the Option associated with the value
IllegalStateException - if more than one values are found
public final Object getValue(Option option,
Object defaultValue)
throws IllegalStateException
getValue in interface CommandLineoption - the Option associated with the valuedefaultValue - the result to use if no values are found
IllegalStateException - if more than one value is foundpublic final Boolean getSwitch(String trigger)
getSwitch in interface CommandLinetrigger - a trigger used to lookup the Option
public final Boolean getSwitch(String trigger,
Boolean defaultValue)
getSwitch in interface CommandLinetrigger - a trigger used to lookup the OptiondefaultValue - the Boolean to use if none match
public final Boolean getSwitch(Option option)
getSwitch in interface CommandLineoption - the Option associated with the value
public final String getProperty(String property)
getProperty in interface CommandLineproperty - the property name to lookup
public final int getOptionCount(String trigger)
getOptionCount in interface CommandLinetrigger - a trigger used to lookup the Option
public final int getOptionCount(Option option)
getOptionCount in interface CommandLineoption - the Option associated to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||