|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.base.Handler sofya.graphs.irg.IRGHandler
public class IRGHandler
The IRGHandler provides routines to read and write interclass relation graph
('.prog.irg
') files in the Sofya database.
Since there is a one-to-one mapping between IRGs and their corresponding database files, static methods suffice to read and write the database files. Thus this handler cannot be instantiated.
IRG
Field Summary |
---|
Fields inherited from class sofya.base.Handler |
---|
HANDLER_EXTENSIONS, LINE_SEP |
Method Summary | |
---|---|
static void |
main(java.lang.String[] argv)
Test driver for IRGHandler. |
static IRG |
readIRGFile(java.lang.String fileName,
java.lang.String tag)
Reads an interclass relation graph from a ' .prog.irg ' file in the database directory. |
static void |
writeIRGFile(java.lang.String fileName,
java.lang.String tag,
IRG irg)
Writes an interclass relation graph to a ' .prog.irg ' file in the database directory. |
Methods inherited from class sofya.base.Handler |
---|
copyFile, createCacheFile, disableParseNumbers, ensureTagExists, formatSignature, isIntAvailable, isStringAvailable, newCache, openCacheFile, openInputFile, openInputFile, openOutputFile, openOutputFile, parseClass, prepareTokenizer, readInt, readIntIgnoreEOL, readJarClasses, readNextLine, readProgFile, readString, readStringIgnoreEOL, readToEOL, readToNextDataLine, toBinary, toHex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void writeIRGFile(java.lang.String fileName, java.lang.String tag, IRG irg) throws java.io.IOException
.prog.irg
' file in the database directory.
fileName
- Name of the IRG database file to be written. This
should include the '.prog
' portion of the
extension.tag
- Database tag to be associated with the file.irg
- Interclass relation graph to be written to the database
file.
java.io.IOException
- If there is an error writing to the file.public static IRG readIRGFile(java.lang.String fileName, java.lang.String tag) throws java.io.FileNotFoundException, EmptyFileException, BadFileFormatException, java.io.IOException
.prog.irg
' file in the database directory.
fileName
- Name of the IRG database file to be read. This
should include the '.prog
' portion of the
extension.tag
- Database tag associated with the file.
java.io.FileNotFoundException
- If the specified file doesn't exist.
EmptyFileException
- If the specified file contains no data.
BadFileFormatException
- If the specified file is not an IRG
file or is otherwise malformed or corrupted.
java.io.IOException
- If there is an error reading from the IRG file.public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |