sofya.apps.dejavu
Interface GraphLoader

All Known Implementing Classes:
CFGLoader

public interface GraphLoader

This interface defines the contract for classes that provide the service of loading graphs built from Java classes.

Classes implementing this interface should provide some means of storing what class is being operated on, so that object instantiations can be kept to a minimum.

Version:
09/20/2004
Author:
CS562 2003 dev team., Alex Kinneer

Method Summary
 Graph getGraph(java.lang.String method)
          Gets the graph for a given method.
 java.lang.String[] getMethodList()
          Gets the list of methods available in the current class.
 void setClass(java.lang.String className, java.lang.String tag)
          Sets the class for which graphs are to be retrieved.
 

Method Detail

getMethodList

java.lang.String[] getMethodList()
Gets the list of methods available in the current class.

Returns:
The list of available method names.

getGraph

Graph getGraph(java.lang.String method)
               throws MethodNotFoundException
Gets the graph for a given method.

Parameters:
method - Name of the method for which to retrieve a graph.
Returns:
The graph for that method.
Throws:
MethodNotFoundException - If no method by the given name exists in the loaded class.

setClass

void setClass(java.lang.String className,
              java.lang.String tag)
              throws java.io.FileNotFoundException,
                     EmptyFileException,
                     BadFileFormatException,
                     java.io.IOException
Sets the class for which graphs are to be retrieved.

Parameters:
className - The class from which graphs will be loaded.
tag - Database tag associated with the class's graph data.
Throws:
java.io.FileNotFoundException - If the graph data file for the specified class cannot be found.
EmptyFileException - If the graph data file for the class is empty.
BadFileFormatException - If the graph data file for the class is corrupted.
java.io.IOException - For any other IO error that prevents the graph data file from being read successfully.