SandMark version 2.0


sandmark.util
Class MethodNode

java.lang.Object
  |
  +--sandmark.util.MethodID
        |
        +--sandmark.util.MethodNode
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class MethodNode
extends MethodID
implements java.lang.Comparable, java.io.Serializable

guilty party: andy lenards project: SandMark topic: Robust Source Code Obfuscation advisor: Dr. Christian Collberg location: University of Arizona, Computer Science Dept. date: Nov. 11, 2001 class: MethodNode.java use: Method Name Obfuscation, will be used to create interference graphs for method renaming.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class sandmark.util.MethodID
MISSING_String, name, signature, sourceName, Static
 
Constructor Summary
MethodNode(java.lang.String classFrom, java.lang.String method, java.lang.String methodSignature)
          Constructs a MethodNode object with three strings
MethodNode(java.lang.String classFrom, java.lang.String method, java.lang.String methodSignature, boolean Static)
           
 
Method Summary
 void addEdge(MethodNode node)
          adds an edge from this node to the node passed as a parameter
 int compareTo(java.lang.Object obj)
          compares two MethodNode objects and returns an integer value that represents which is less than, greater than, or equal
 java.util.Iterator connectedTo()
           
 java.lang.String getClassName()
          provides access to the class name
 java.lang.String getMethodName()
          provides access to the method name
 java.lang.String getMethodSignature()
          provides access to the method signature
 java.lang.String getNewName()
          provides access to the new name that will be assigned to the method name
static void main(java.lang.String[] andy)
           
 int numEdges()
           
 boolean removeEdge(MethodNode node)
          removes an edge from this node to the node passed as a parameter iff there exists an edge between them
 void setDebug(boolean onOrOff)
           
 void setNewName(java.lang.String name)
          allows the new method name to be modified
 java.lang.String toString()
          creates a string representation of the state of the MethodNode
 
Methods inherited from class sandmark.util.MethodID
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodNode

public MethodNode(java.lang.String classFrom,
                  java.lang.String method,
                  java.lang.String methodSignature)
Constructs a MethodNode object with three strings

Parameters:
classFrom - - string representation of the class which the method is from
method - - string representation of the method name
methodSignature - - string representation of the signature of the method

MethodNode

public MethodNode(java.lang.String classFrom,
                  java.lang.String method,
                  java.lang.String methodSignature,
                  boolean Static)
Method Detail

getMethodName

public java.lang.String getMethodName()
provides access to the method name

Returns:
a String that represents the method name

getClassName

public java.lang.String getClassName()
provides access to the class name

Returns:
a String that represents the class name

getMethodSignature

public java.lang.String getMethodSignature()
provides access to the method signature

Returns:
a String that represents the method signature

getNewName

public java.lang.String getNewName()
provides access to the new name that will be assigned to the method name

Returns:
a String that represents the new method name

setNewName

public void setNewName(java.lang.String name)
allows the new method name to be modified

Parameters:
name - - the new name of the method

setDebug

public void setDebug(boolean onOrOff)

addEdge

public void addEdge(MethodNode node)
adds an edge from this node to the node passed as a parameter

Parameters:
node - - the node to add an edge to

removeEdge

public boolean removeEdge(MethodNode node)
removes an edge from this node to the node passed as a parameter iff there exists an edge between them

Parameters:
node - - the node to remove an edge from
Returns:
true if the edge was removed, else false

connectedTo

public java.util.Iterator connectedTo()

numEdges

public int numEdges()

compareTo

public int compareTo(java.lang.Object obj)
compares two MethodNode objects and returns an integer value that represents which is less than, greater than, or equal

Specified by:
compareTo in interface java.lang.Comparable
Returns:
the value is 0 if the parameter and this MethodNode are equal; the value is less than 0 if this MethodNode is defined to be the predecessor of the parameter MethodNode; the value is greater than 0 if this MethodNode is defined to be the successor of the parameter MethodNode

toString

public java.lang.String toString()
creates a string representation of the state of the MethodNode

Overrides:
toString in class MethodID
Returns:
a String representing the values of the MethodNode with the format: ::::

main

public static void main(java.lang.String[] andy)

SandMark version 2.0

Mon Jun 17 12:30:47 MST 2002