|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.apps.dejavu.NodeComparer
public abstract class NodeComparer
This abstract class defines the contract for classes that provide the service of comparing nodes from different Java classes for equality. The actual means of comparison is abstracted behind this interface, and is (of course) up to the class providing a concrete implementation of the interface.
Field Summary | |
---|---|
protected ClassPair |
class_
Information about the class which is currently loaded for node comparisons. |
Constructor Summary | |
---|---|
protected |
NodeComparer()
No-argument constructor for subclasses only. |
Method Summary | |
---|---|
abstract boolean |
compareNodes(java.lang.String methodName,
Node oldNode,
Node newNode)
Compares two nodes from the same method in two different graphs (versions of the program). |
abstract java.lang.String |
getCallMethodName(java.lang.String methodName,
Node oldCallNode,
Node newCallNode)
Retrives the name of the method that is invoked by a call node. |
ClassPair |
getComparisonClass()
Gets the name of the class from which the nodes to be compared are obtained (as set by setComparisonClass(sofya.apps.dejavu.ClassPair) . |
void |
setComparisonClass(ClassPair clazz)
Sets the name of the class from which the nodes to be compared are obtained. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ClassPair class_
Constructor Detail |
---|
protected NodeComparer()
Method Detail |
---|
public ClassPair getComparisonClass()
setComparisonClass(sofya.apps.dejavu.ClassPair)
.
public void setComparisonClass(ClassPair clazz) throws java.io.IOException
clazz
- Information about the class from which nodes are
to be compared.
java.io.IOException
- If the class or class-related file cannot
be loaded (most comparers are expected to need to access files
based on this information.)public abstract java.lang.String getCallMethodName(java.lang.String methodName, Node oldCallNode, Node newCallNode) throws MethodNotFoundException
methodName
- Name of the method which contains the call node
for which the called method name is being requested.oldCallNode
- Call node in the original graph.newCallNode
- Call node in the modified graph.
MethodNotFoundException
- If no method matching the specified
name can be found within which to locate the call nodes.public abstract boolean compareNodes(java.lang.String methodName, Node oldNode, Node newNode) throws MethodNotFoundException, java.lang.NullPointerException
methodName
- Name of the method from which the nodes for
comparison have been obtained.oldNode
- Node for comparison from the original graph.newNode
- Node for comparison from the modified graph.
true
if the two nodes are equivalent,
false
otherwise.
MethodNotFoundException
- If no method by the given name exists
in one or both of the graphs.
java.lang.NullPointerException
- If a valid node for comparison is
not provided.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |