SandMark version 3.0


sandmark.watermark.objectwm
Class MethodCopyUtil

java.lang.Object
  |
  +--sandmark.watermark.objectwm.MethodCopyUtil

public class MethodCopyUtil
extends java.lang.Object

This class implements the method overloading features for embedding the watermark vector instruction groups


Field Summary
(package private)  Config config
           
 int copyMethodOption0
           
 int copyMethodOption1
           
 int copyMethodOption2
           
(package private)  ObjectHelper helper
           
 int methodInvocationCount
           
(package private)  ObjectUtil util
           
 
Constructor Summary
MethodCopyUtil(ObjectUtil objUtil)
           
 
Method Summary
 de.fub.bytecode.generic.MethodGen createCloneMethod(java.lang.String className, de.fub.bytecode.generic.MethodGen mg)
          Creates an intial copy of an existing method which is to be overloaded and returns the MethodGen object of the created method
 int createMethodInvocation(de.fub.bytecode.generic.MethodGen mg, de.fub.bytecode.generic.Type[] consArgTypes, de.fub.bytecode.generic.MethodGen consmg)
           
 de.fub.bytecode.generic.MethodGen deleteMethodParameter1(de.fub.bytecode.generic.MethodGen mg)
          Second approach of overloading method, deleting a parameter and then removing all the instructions that access the deleted parameter
 de.fub.bytecode.generic.MethodGen deleteMethodParameter2(de.fub.bytecode.generic.MethodGen mg)
          Third approach of overloading method, deleting a parameter and then creating a new variable to replicate the deleted parameter
 void deleteTargeterRange(de.fub.bytecode.generic.MethodGen mg, de.fub.bytecode.generic.InstructionList instrList, int index)
          Deletes the instructions within 2 consecutive targeters in which the instruction referenced by 'index' lies
 de.fub.bytecode.generic.MethodGen insertMethodParameter(de.fub.bytecode.generic.MethodGen mg)
          First approach of overloading method, inserting a new parameter
 void reInitializeParameters(de.fub.bytecode.generic.MethodGen mg)
          Re-initializes the parameters of the newly created method
 boolean remVecfreqUpdatesInThreshold(int numVectors, int currVecIndex, VectorUpdateCtrl vecObj, de.fub.bytecode.generic.MethodGen mg)
          This method checks that the sideEffects of overloading a method is within a particular threshold limit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

util

ObjectUtil util

helper

ObjectHelper helper

config

Config config

copyMethodOption0

public int copyMethodOption0

copyMethodOption1

public int copyMethodOption1

copyMethodOption2

public int copyMethodOption2

methodInvocationCount

public int methodInvocationCount
Constructor Detail

MethodCopyUtil

public MethodCopyUtil(ObjectUtil objUtil)
Method Detail

remVecfreqUpdatesInThreshold

public boolean remVecfreqUpdatesInThreshold(int numVectors,
                                            int currVecIndex,
                                            VectorUpdateCtrl vecObj,
                                            de.fub.bytecode.generic.MethodGen mg)
This method checks that the sideEffects of overloading a method is within a particular threshold limit


deleteMethodParameter2

public de.fub.bytecode.generic.MethodGen deleteMethodParameter2(de.fub.bytecode.generic.MethodGen mg)
Third approach of overloading method, deleting a parameter and then creating a new variable to replicate the deleted parameter


deleteMethodParameter1

public de.fub.bytecode.generic.MethodGen deleteMethodParameter1(de.fub.bytecode.generic.MethodGen mg)
Second approach of overloading method, deleting a parameter and then removing all the instructions that access the deleted parameter


createCloneMethod

public de.fub.bytecode.generic.MethodGen createCloneMethod(java.lang.String className,
                                                           de.fub.bytecode.generic.MethodGen mg)
Creates an intial copy of an existing method which is to be overloaded and returns the MethodGen object of the created method


reInitializeParameters

public void reInitializeParameters(de.fub.bytecode.generic.MethodGen mg)
Re-initializes the parameters of the newly created method


insertMethodParameter

public de.fub.bytecode.generic.MethodGen insertMethodParameter(de.fub.bytecode.generic.MethodGen mg)
First approach of overloading method, inserting a new parameter


deleteTargeterRange

public void deleteTargeterRange(de.fub.bytecode.generic.MethodGen mg,
                                de.fub.bytecode.generic.InstructionList instrList,
                                int index)
Deletes the instructions within 2 consecutive targeters in which the instruction referenced by 'index' lies


createMethodInvocation

public int createMethodInvocation(de.fub.bytecode.generic.MethodGen mg,
                                  de.fub.bytecode.generic.Type[] consArgTypes,
                                  de.fub.bytecode.generic.MethodGen consmg)

SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003