Class Options
java.lang.Object
org.apache.felix.gogo.options.Options
- All Implemented Interfaces:
Option
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionget remaining non-options args as Objects.args()get remaining non-options args as Strings.static Optionstatic Optionstatic Optionstatic Optionget value of named option.get list of all values for named option.intget value of named option as a Number.get value of named option as an Object.getObjectList(String name) get list of all Object values for named option.booleantest whether specified option has been explicitly set.static voidparse arguments.parse arguments.parse arguments.parse arguments.setOptionsFirst(boolean optionsFirst) require options to precede args.setStopOnBadOption(boolean stopOnBadOption) stop parsing on the first unknown option.toString()voidusage()print usage message to System.err.usageError(String s) prints usage message and returns IllegalArgumentException, for you to throw.
-
Field Details
-
NL
-
-
Method Details
-
main
-
compile
-
compile
-
compile
-
compile
-
setStopOnBadOption
Description copied from interface:Optionstop parsing on the first unknown option. This allows one parser to get its own options and then pass the remaining options to another parser.- Specified by:
setStopOnBadOptionin interfaceOption- Parameters:
stopOnBadOption- stopOnBadOption- Returns:
- Option
-
setOptionsFirst
Description copied from interface:Optionrequire options to precede args. Default is false, so options can appear between or after args.- Specified by:
setOptionsFirstin interfaceOption- Parameters:
optionsFirst- optionsFirst- Returns:
- Option
-
isSet
-
getObject
Description copied from interface:Optionget value of named option as an Object. If multiple options given, this method returns the last one. UseOption.getObjectList(String)to get all values. -
getObjectList
-
getList
-
get
-
getNumber
-
argObjects
Description copied from interface:Optionget remaining non-options args as Objects.- Specified by:
argObjectsin interfaceOption- Returns:
- List<Object>
-
args
-
usage
-
usageError
prints usage message and returns IllegalArgumentException, for you to throw.- Specified by:
usageErrorin interfaceOption- Parameters:
s- the error- Returns:
- IllegalArgumentException
-
parse
-
parse
-
parse
-
parse
Description copied from interface:Optionparse arguments. If skipArgv0 is true, then parsing begins at arg1. This allows for commands where argv0 is the command name rather than a real argument. -
toString
-