avrora
Class Main
java.lang.Object
avrora.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.
|
Constructor Summary |
Main()
|
|
Method Summary |
static ProgramReader |
getProgramReader()
|
static ProgramReader |
getProgramReader(java.lang.String format)
|
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. |
static Program |
readProgram(java.lang.String[] args)
The readProgram() method reads a program from the command line arguments given the format
specified at the command line. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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
INDIRECT_EDGES
public static final Option.List INDIRECT_EDGES
FOREGROUND
public static final Option.Str FOREGROUND
CONFIGFILE
public static final Option.Str CONFIGFILE
Main
public Main()
getProgramReader
public static ProgramReader getProgramReader()
getProgramReader
public static ProgramReader getProgramReader(java.lang.String format)
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
readProgram
public static Program readProgram(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