org.openflow.example.cli
Class SimpleCLI
java.lang.Object
org.openflow.example.cli.SimpleCLI
public class SimpleCLI
- extends java.lang.Object
Very basic command line interface
(really should be something in java.* for this; only implementing this to
remove external dependencies)
Modeled after org.apache.common.cli .
- Author:
- Rob Sherwood (rob.sherwood@stanford.edu)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getOptind
public int getOptind()
- Returns:
- the index of the last parsed option
Useful for finding options that don't start with "-" or "--"
setOptind
public void setOptind(int optind)
- Parameters:
optind
- the optind to set
hasOption
public boolean hasOption(java.lang.String shortName)
getOptionValue
public java.lang.String getOptionValue(java.lang.String shortName)
parse
public static SimpleCLI parse(Options options,
java.lang.String[] args)
throws ParseException
- Throws:
ParseException
printHelp
public static void printHelp(java.lang.String canonicalName,
Options options)