avrora.core
Class ProgramReader
java.lang.Object
avrora.util.help.HelpCategory
avrora.core.ProgramReader
- All Implemented Interfaces:
- HelpItem
- Direct Known Subclasses:
- AtmelProgramReader, Defaults.AutoProgramReader, GASProgramReader, ObjDump2ProgramReader, ObjDumpProgramReader
- public abstract class ProgramReader
- extends HelpCategory
The ProgramReader
class represents an object capable of reading a program given the special
command line arguments. It may for example read source assembly and produce a simplified program.
Field Summary |
Option.List |
INDIRECT_EDGES
|
Options |
options
The options field stores a reference to an instance of the Options class that
encapsulates the command line options available to this reader. |
Constructor Summary |
protected |
ProgramReader(java.lang.String h)
The constructor for the ProgramReader class builds a new reader with the specified
help text. |
Method Summary |
protected void |
addIndirectEdges(Program p)
The addIndirectEdges() method adds any indirect edges specified in the "-indirect-edges"
option to the program representation. |
abstract Program |
read(java.lang.String[] args)
The read() method will read a program in and produce a simplified format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
options
public final Options options
- The
options
field stores a reference to an instance of the Options
class that
encapsulates the command line options available to this reader.
INDIRECT_EDGES
public final Option.List INDIRECT_EDGES
ProgramReader
protected ProgramReader(java.lang.String h)
- The constructor for the
ProgramReader
class builds a new reader with the specified
help text. Since a program reader is also a help category, the constructor will also add an options
section containing help for each specific option.
- Parameters:
h
- the help text for this reader
read
public abstract Program read(java.lang.String[] args)
throws java.lang.Exception
- The
read()
method will read a program in and produce a simplified format.
- Parameters:
args
- the command line arguments
- Returns:
- a program instance representing the program
- Throws:
java.lang.Exception
addIndirectEdges
protected void addIndirectEdges(Program p)
- The
addIndirectEdges()
method adds any indirect edges specified in the "-indirect-edges"
option to the program representation.
- Parameters:
p
- the program to add indirect edges to