roast
Class FlagSpec

java.lang.Object
  |
  +--roast.FlagSpec

public class FlagSpec
extends java.lang.Object

A FlagSpec object is a description of a command-line flag.


Field Summary
 boolean argRequired
          The flag must have an argument.
 roast.ArgType argType
          The type of the flag's argument.
 java.lang.String flagName
          The flag string with leading flag delimiter.
 boolean isRequired
          The flag must be present.
 
Constructor Summary
FlagSpec(java.lang.String flagName, boolean isRequired, boolean argRequired, roast.ArgType argType)
          Initialize flag specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flagName

public final java.lang.String flagName
The flag string with leading flag delimiter.

isRequired

public final boolean isRequired
The flag must be present.

argRequired

public final boolean argRequired
The flag must have an argument.

argType

public final roast.ArgType argType
The type of the flag's argument.
Constructor Detail

FlagSpec

public FlagSpec(java.lang.String flagName,
                boolean isRequired,
                boolean argRequired,
                roast.ArgType argType)
         throws ParameterException
Initialize flag specification.
Exceptions
if flagName or argType is null or flagName does not contain a leading '-' then throw ParameterException