com.townleyenterprises.command
Class PosixCommandOption

java.lang.Object
  extended bycom.townleyenterprises.command.CommandOption
      extended bycom.townleyenterprises.command.PosixCommandOption

public class PosixCommandOption
extends CommandOption

This class provides support for POSIX-compliant command options.

Since:
2.1
Version:
$Id: PosixCommandOption.java,v 1.3 2004/07/28 10:33:58 atownley Exp $
Author:
Andrew S. Townley

Constructor Summary
PosixCommandOption(java.lang.String name, boolean hasArg, java.lang.String argHelp, java.lang.String argDesc)
          POSIX command options can't have both and long forms (we're not counting abbreviations at the moment).
 
Method Summary
 java.lang.String getLongName()
           
 java.lang.Character getShortName()
           
 
Methods inherited from class com.townleyenterprises.command.CommandOption
execute, getArg, getArgumentDefault, getArgValue, getDescription, getExpectsArgument, getHelp, getMatched, getName, getShowArgInHelp, hashCode, optionMatched, parseOption, parseOptions, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PosixCommandOption

public PosixCommandOption(java.lang.String name,
                          boolean hasArg,
                          java.lang.String argHelp,
                          java.lang.String argDesc)
POSIX command options can't have both and long forms (we're not counting abbreviations at the moment). This method creates the option using the indicated switch and values.

Parameters:
name - the name to be checked
hasArg - true if this option expects an argument; false if it is a switch
argHelp - the help string for the argument
argDesc - the long description of what the argument does
Method Detail

getLongName

public java.lang.String getLongName()
Overrides:
getLongName in class CommandOption

getShortName

public java.lang.Character getShortName()
Overrides:
getShortName in class CommandOption


Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises. All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.