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