avrora.util.help
Class ClassMapValueItem

java.lang.Object
  extended byavrora.util.help.ClassMapValueItem
All Implemented Interfaces:
HelpItem

public class ClassMapValueItem
extends java.lang.Object
implements HelpItem

The ClassMapValueItem is a help item representing one possible value for an option, where the value of the option is used to access a class map. For example, the "-action" option accepts a value where the user specifies what action the main program should perform. In this case, for each of the possible values of this option, a ClassMapValueItem instance will be created that is used in constructing the help text for the actions help category.


Field Summary
protected  java.lang.String help
           
 int indent
           
 ClassMap map
           
 java.lang.String optname
           
 java.lang.String optvalue
           
 
Constructor Summary
ClassMapValueItem(int indent, java.lang.String optname, java.lang.String optvalue, ClassMap map)
          The constructor for the ClassMapValueItem class creates a new instance of a help item for the specified option and value.
 
Method Summary
 java.lang.String getHelp()
          The getHelp() method returns a help string for this help item.
 void printHelp()
          The printHelp() method prints out a well-formatted paragraph for this option and the value specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

indent

public final int indent

optname

public final java.lang.String optname

optvalue

public final java.lang.String optvalue

map

public final ClassMap map

help

protected java.lang.String help
Constructor Detail

ClassMapValueItem

public ClassMapValueItem(int indent,
                         java.lang.String optname,
                         java.lang.String optvalue,
                         ClassMap map)
The constructor for the ClassMapValueItem class creates a new instance of a help item for the specified option and value. The classmap passed is used to get an instance of the object corresponding to that value so that any help that it has can be added underneath the option.

Parameters:
indent - the number of spaces to indent when printing the help
optname - the name of the option
optvalue - the string value of the option
map - the classmap which is used to get instances for this value
Method Detail

getHelp

public java.lang.String getHelp()
The getHelp() method returns a help string for this help item.

Specified by:
getHelp in interface HelpItem
Returns:
a string representing the help for this item

printHelp

public void printHelp()
The printHelp() method prints out a well-formatted paragraph for this option and the value specified. If there is help for the value associated with this option, it will format it as part of the help for this item.

Specified by:
printHelp in interface HelpItem