public class DefaultApplicationArguments extends java.lang.Object implements ApplicationArguments
ApplicationArguments
.Constructor and Description |
---|
DefaultApplicationArguments(java.lang.String... args) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsOption(java.lang.String name)
Return whether the set of option arguments parsed from the arguments contains an
option with the given name.
|
java.util.List<java.lang.String> |
getNonOptionArgs()
Return the collection of non-option arguments parsed.
|
java.util.Set<java.lang.String> |
getOptionNames()
Return the names of all option arguments.
|
java.util.List<java.lang.String> |
getOptionValues(java.lang.String name)
Return the collection of values associated with the arguments option having the
given name.
|
java.lang.String[] |
getSourceArgs()
Return the raw unprocessed arguments that were passed to the application.
|
public DefaultApplicationArguments(java.lang.String... args)
public java.lang.String[] getSourceArgs()
ApplicationArguments
getSourceArgs
in interface ApplicationArguments
public java.util.Set<java.lang.String> getOptionNames()
ApplicationArguments
["foo", "debug"]
.getOptionNames
in interface ApplicationArguments
public boolean containsOption(java.lang.String name)
ApplicationArguments
containsOption
in interface ApplicationArguments
name
- the name to checktrue
if the arguments contain an option with the given namepublic java.util.List<java.lang.String> getOptionValues(java.lang.String name)
ApplicationArguments
[]
)["bar"]
)["bar", "baz"]
)null
getOptionValues
in interface ApplicationArguments
name
- the name of the optionpublic java.util.List<java.lang.String> getNonOptionArgs()
ApplicationArguments
getNonOptionArgs
in interface ApplicationArguments