org.apache.axis.utils
Class Options
java.lang.Object
org.apache.axis.utils.Options
public class Options
extends java.lang.Object
General purpose command line options parser.
If this is used outside of Axis just remove the Axis specific sections.
- Doug Davis (dug@us.ibm.com)
Options(_args[] ) - Constructor - just pass in the args from the command line.
|
String | getHost()
|
String | getPassword()
|
int | getPort()
|
String[] | getRemainingArgs() - This returns an array of unused args - these are the non-option
args from the command line.
|
String | getRemainingFlags() - This just returns a string with the unprocessed flags - mainly
for error reporting - so you can report the unknown flags.
|
String | getURL()
|
String | getUser()
|
int | isFlagSet(char optChar) - Returns an int specifying the number of times that the flag was
specified on the command line.
|
String | isValueSet(char optChar) - Returns a string (or null) specifying the value for the passed
option.
|
void | setDefaultURL(String url)
|
void | setDefaultURL(URL url)
|
log
protected static Log log
Options
public Options(_args[] )
throws MalformedURLException
Constructor - just pass in the args from the command line.
getHost
public String getHost()
getPassword
public String getPassword()
getPort
public int getPort()
getRemainingArgs
public String[] getRemainingArgs()
This returns an array of unused args - these are the non-option
args from the command line.
getRemainingFlags
public String getRemainingFlags()
This just returns a string with the unprocessed flags - mainly
for error reporting - so you can report the unknown flags.
getURL
public String getURL()
throws MalformedURLException
getUser
public String getUser()
isFlagSet
public int isFlagSet(char optChar)
Returns an int specifying the number of times that the flag was
specified on the command line. Once this flag is looked for you
must save the result because if you call it again for the same
flag you'll get zero.
isValueSet
public String isValueSet(char optChar)
Returns a string (or null) specifying the value for the passed
option. If the option isn't there then null is returned. The
option's value can be specified one of two ways:
-x value
-xvalue
Note that: -ax value
is not value (meaning flag 'a' followed by option 'x'.
Options with values must be the first char after the '-'.
If the option is specified more than once then the last one wins.
setDefaultURL
public void setDefaultURL(String url)
throws MalformedURLException
setDefaultURL
public void setDefaultURL(URL url)
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.