gov.llnl.babel
Class UserOptions.RequiredArgSwitch

java.lang.Object
  extended by gov.llnl.babel.UserOptions.RequiredArgSwitch
All Implemented Interfaces:
CommandLineSwitch
Direct Known Subclasses:
UserOptions.AssertionLevelSwitch, UserOptions.ClientSwitch, UserOptions.DefaultRepositoryPathSwitch, UserOptions.ExcludeSwitch, UserOptions.MakePrefixSwitch, UserOptions.OutputDirectorySwitch, UserOptions.ParseResolveOption, UserOptions.RepositoryPathSwitch, UserOptions.ServerSwitch, UserOptions.TextSwitch, UserOptions.TouchOption, UserOptions.VpathSwitch
Enclosing class:
UserOptions

public abstract static class UserOptions.RequiredArgSwitch
extends java.lang.Object


Constructor Summary
UserOptions.RequiredArgSwitch(int shortForm, java.lang.String longName, java.lang.String helpText, java.lang.String argName)
           
 
Method Summary
 java.lang.String getArgumentName()
          If the switch has an argument, what name should be used to identify it in the help text.
 boolean hasRequiredArgument()
          Return true if and only if, this command line switch requires an argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.llnl.babel.cli.CommandLineSwitch
processCommandSwitch
 

Constructor Detail

UserOptions.RequiredArgSwitch

public UserOptions.RequiredArgSwitch(int shortForm,
                                     java.lang.String longName,
                                     java.lang.String helpText,
                                     java.lang.String argName)
Method Detail

hasRequiredArgument

public boolean hasRequiredArgument()
Description copied from interface: CommandLineSwitch
Return true if and only if, this command line switch requires an argument. If this method returns true, hasOptionalArgument should return false.

Specified by:
hasRequiredArgument in interface CommandLineSwitch
Returns:
true implies that the switch take an optional argument; false implies that it does not.

getArgumentName

public java.lang.String getArgumentName()
Description copied from interface: CommandLineSwitch
If the switch has an argument, what name should be used to identify it in the help text. You may refer to this name in getHelpText.

Specified by:
getArgumentName in interface CommandLineSwitch
Returns:
null or the name of the optional or required argument.