Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.axis.utils
Class Options  view Options download Options.java

java.lang.Object
  extended byorg.apache.axis.utils.Options

public class Options
extends java.lang.Object


Field Summary
(package private)  java.lang.String[] args
           
(package private)  java.net.URL defaultURL
           
protected static org.apache.commons.logging.Log log
           
(package private)  java.util.Vector usedArgs
           
 
Constructor Summary
Options(java.lang.String[] _args)
          Constructor - just pass in the args from the command line.
 
Method Summary
 java.lang.String getHost()
           
 java.lang.String getPassword()
           
 int getPort()
           
 java.lang.String[] getRemainingArgs()
          This returns an array of unused args - these are the non-option args from the command line.
 java.lang.String getRemainingFlags()
          This just returns a string with the unprocessed flags - mainly for error reporting - so you can report the unknown flags.
 java.lang.String getURL()
           
 java.lang.String getUser()
           
 int isFlagSet(char optChar)
          Returns an int specifying the number of times that the flag was specified on the command line.
 java.lang.String isValueSet(char optChar)
          Returns a string (or null) specifying the value for the passed option.
 void setDefaultURL(java.lang.String url)
           
 void setDefaultURL(java.net.URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

args

java.lang.String[] args

usedArgs

java.util.Vector usedArgs

defaultURL

java.net.URL defaultURL
Constructor Detail

Options

public Options(java.lang.String[] _args)
        throws java.net.MalformedURLException
Constructor - just pass in the args from the command line.

Method Detail

setDefaultURL

public void setDefaultURL(java.lang.String url)
                   throws java.net.MalformedURLException

setDefaultURL

public void setDefaultURL(java.net.URL url)

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 java.lang.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.


getRemainingFlags

public java.lang.String getRemainingFlags()
This just returns a string with the unprocessed flags - mainly for error reporting - so you can report the unknown flags.


getRemainingArgs

public java.lang.String[] getRemainingArgs()
This returns an array of unused args - these are the non-option args from the command line.


getURL

public java.lang.String getURL()
                        throws java.net.MalformedURLException

getHost

public java.lang.String getHost()

getPort

public int getPort()

getUser

public java.lang.String getUser()

getPassword

public java.lang.String getPassword()