edu.neu.ccs.demeterf.util
Class CLI

java.lang.Object
  extended by edu.neu.ccs.demeterf.util.CLI

public class CLI
extends java.lang.Object

CLI Utility Class for parsing arguments etc.


Field Summary
static int ARGS
          Arguments index within the array returned from splitArgs
static int OPTS
          Options index within the array returned from splitArgs
 
Method Summary
static java.lang.String[] separateOption(java.lang.String name, List<java.lang.String> opts)
          Returns the seperated list that makes up a command-line option of the form: "--name:A:B:C".
static List<java.lang.String>[] splitArgs(java.lang.String[] args)
          Takes an array of strings (presumably from the command-line) and separates them into Options and Argsuments.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARGS

public static int ARGS
Arguments index within the array returned from splitArgs


OPTS

public static int OPTS
Options index within the array returned from splitArgs

Method Detail

splitArgs

public static List<java.lang.String>[] splitArgs(java.lang.String[] args)
Takes an array of strings (presumably from the command-line) and separates them into Options and Argsuments. Options begin with '-', but I prefer "--" so they stick out a little more. See DemFGenMain and Inline for examples.


separateOption

public static java.lang.String[] separateOption(java.lang.String name,
                                                List<java.lang.String> opts)
Returns the seperated list that makes up a command-line option of the form: "--name:A:B:C". For this command-line option this method will return: new String[]{"A","B","C"}