avrora
Class Main

java.lang.Object
  extended byavrora.Main

public class Main
extends java.lang.Object

This is the main entrypoint to Avrora. It is responsible for parsing the options to the main program and selecting the appropriate action. Currently, it also implements the help system.


Field Summary
static Option.Str ACTION
           
static Option.Bool BANNER
           
static Option.Bool COLORS
           
static Option.Str CONFIGFILE
           
static Option.Bool HELP
           
static Option.Bool HTML
           
static Option.Str INPUT
           
static Option.Bool LICENSE
           
static Option.Bool STATUS
           
static Option.List VERBOSE
           
 
Constructor Summary
Main()
           
 
Method Summary
static void checkFileExists(java.lang.String fstr)
           
static void checkFilesExist(java.lang.String[] files)
           
static Program loadProgram(java.lang.String[] args)
          The readProgram() method reads a program from the command line arguments given the format specified at the command line.
static void main(java.lang.String[] args)
          The main() method is the entrypoint into Avrora.
static void parseOptions(java.lang.String[] args)
          The parseOptions() method takes an array of strings and parses it, extracting the options and storing the option values in the internal state of main.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT

public static final Option.Str INPUT

ACTION

public static final Option.Str ACTION

COLORS

public static final Option.Bool COLORS

BANNER

public static final Option.Bool BANNER

STATUS

public static final Option.Bool STATUS

VERBOSE

public static final Option.List VERBOSE

HELP

public static final Option.Bool HELP

LICENSE

public static final Option.Bool LICENSE

HTML

public static final Option.Bool HTML

CONFIGFILE

public static final Option.Str CONFIGFILE
Constructor Detail

Main

public Main()
Method Detail

main

public static void main(java.lang.String[] args)
The main() method is the entrypoint into Avrora. It processes the command line options, looks up the action, and prints help (if there are no arguments or the -help option is specified.

Parameters:
args - an array of strings representing the command line arguments passed by the user

parseOptions

public static void parseOptions(java.lang.String[] args)
The parseOptions() method takes an array of strings and parses it, extracting the options and storing the option values in the internal state of main.

Parameters:
args - the array of strings to parse into options

loadProgram

public static Program loadProgram(java.lang.String[] args)
                           throws java.lang.Exception
The readProgram() method reads a program from the command line arguments given the format specified at the command line. It will also process the indirect-call edge information and add it to the Program instance returned. This method is primarily used by actions that manipulate programs.

Parameters:
args - an array of strings representing command line arguments with the options removed
Returns:
an instance of the Program class if the program can be loaded correctly
Throws:
java.lang.Exception - if there is an error loading the program, such as a file not found exception, parse error, etc

checkFilesExist

public static void checkFilesExist(java.lang.String[] files)

checkFileExists

public static void checkFileExists(java.lang.String fstr)