net.sourceforge.openstego.util
Class CmdLineOption

java.lang.Object
  extended by net.sourceforge.openstego.util.CmdLineOption

public class CmdLineOption
extends java.lang.Object

Stores the master information about a command line option

See Also:
CmdLineParser

Field Summary
static int TYPE_COMMAND
          Command-line option type: COMMAND
static int TYPE_OPTION
          Command-line option type: OPTION
 
Constructor Summary
CmdLineOption(java.lang.String name, java.lang.String altName, int type, boolean takesArgVal)
          Default constructor
 
Method Summary
 java.lang.String getAltName()
          Get method for altName
 java.lang.String getName()
          Get method for name
 int getType()
          Get method for type
 java.lang.String getValue()
          Get method for value
 void setValue(java.lang.String value)
          Set method for value
 boolean takesArg()
          Get method for takesArgVal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_COMMAND

public static final int TYPE_COMMAND
Command-line option type: COMMAND

See Also:
Constant Field Values

TYPE_OPTION

public static final int TYPE_OPTION
Command-line option type: OPTION

See Also:
Constant Field Values
Constructor Detail

CmdLineOption

public CmdLineOption(java.lang.String name,
                     java.lang.String altName,
                     int type,
                     boolean takesArgVal)
              throws java.lang.IllegalArgumentException
Default constructor

Parameters:
name - Name of the option
altName - Altername name of the option
type - Type of the option
takesArgVal - Flag to indicate whether the option takes argument or not
Throws:
java.lang.IllegalArgumentException - If option type is TYPE_COMMAND and takesArgVal is specified as true
Method Detail

setValue

public void setValue(java.lang.String value)
Set method for value

Parameters:
value - Value

getName

public java.lang.String getName()
Get method for name

Returns:
name

getAltName

public java.lang.String getAltName()
Get method for altName

Returns:
altN

getType

public int getType()
Get method for type

Returns:
type

takesArg

public boolean takesArg()
Get method for takesArgVal

Returns:
takesArgVal

getValue

public java.lang.String getValue()
Get method for value

Returns:
value


Copyright © 2007-2009 Samir Vaidya. All Rights Reserved.