org.apache.qpid.util
Class CommandLineParser.CommandLineOption

java.lang.Object
  extended by org.apache.qpid.util.CommandLineParser.CommandLineOption
Enclosing class:
CommandLineParser

protected static class CommandLineParser.CommandLineOption
extends Object

Holds information about a command line options. This includes what its name is, whether or not it is a flag, whether or not it is mandatory, what its user comment is, what its argument reminder text is and what its regular expression format is.

CRC Card
Responsibilities Collaborations
Hold details of a command line option.


Field Summary
 String argument
          Holds a string describing how to use this command line argument.
 String argumentFormatRegexp
          A regular expression describing what format the argument to this option muist have.
 String comment
          Holds a short comment describing what this command line argument is for.
 boolean expectsArgs
          Flag that determines whether or not this command line argument can take arguments.
 boolean mandatory
          Flag that determines whether or not this is an mandatory command line argument.
 String option
          Holds the text for the flag to match this argument with.
 
Constructor Summary
CommandLineParser.CommandLineOption(String option, boolean expectsArgs, String comment, String argument, boolean mandatory, String formatRegexp)
          Create a command line option object that holds specific information about a command line option.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

option

public String option
Holds the text for the flag to match this argument with.


argument

public String argument
Holds a string describing how to use this command line argument.


expectsArgs

public boolean expectsArgs
Flag that determines whether or not this command line argument can take arguments.


comment

public String comment
Holds a short comment describing what this command line argument is for.


mandatory

public boolean mandatory
Flag that determines whether or not this is an mandatory command line argument.


argumentFormatRegexp

public String argumentFormatRegexp
A regular expression describing what format the argument to this option muist have.

Constructor Detail

CommandLineParser.CommandLineOption

public CommandLineParser.CommandLineOption(String option,
                                           boolean expectsArgs,
                                           String comment,
                                           String argument,
                                           boolean mandatory,
                                           String formatRegexp)
Create a command line option object that holds specific information about a command line option.

Parameters:
option - The text that matches the option.
expectsArgs - Whether or not the option expects arguments. It is a flag if this is false.
comment - A comment explaining how to use this option.
argument - A short reminder of the format of the argument to this option/
mandatory - Set to true if this option is mandatory.
formatRegexp - The regular expression that the argument to this option must meet to be valid.


Licensed to the Apache Software Foundation