SandMark version 2.1


sandmark.watermark.objectwm
Class objectUtil

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

public class objectUtil
extends java.lang.Object


Field Summary
 de.fub.bytecode.generic.Instruction bipushObj
           
 de.fub.bytecode.generic.ClassGen cgObj
           
 de.fub.bytecode.generic.ConstantPoolGen cpgObj
           
 de.fub.bytecode.classfile.ConstantPool cpObj
           
 de.fub.bytecode.generic.FieldInstruction getstaticObj
           
 de.fub.bytecode.generic.InstructionHandle ihEmbedStartObj
           
 de.fub.bytecode.generic.InstructionList instrListObj
           
 de.fub.bytecode.classfile.JavaClass jcObj
           
 int localIndexObj
           
static int methodNameSuffix
           
 de.fub.bytecode.generic.MethodGen mgObj
           
 de.fub.bytecode.generic.NEWARRAY naObj
           
 de.fub.bytecode.classfile.Method oldmethod
           
 de.fub.bytecode.classfile.ClassParser pObj
           
 de.fub.bytecode.generic.FieldInstruction putstaticObj
           
 de.fub.bytecode.generic.InstructionHandle targetHandleObj
           
 
Constructor Summary
(package private) objectUtil()
           
 
Method Summary
 boolean checkSplitVectorGrp(int instrIndex, de.fub.bytecode.generic.InstructionHandle[] instrHandles)
          This method checks whether the code to be inserted splits any existing vector groups
 de.fub.bytecode.generic.Instruction extractInstrType(java.lang.String instr)
          This method takes the opcode of the instruction as a String and returns the corresponding 'Instruction' object which is to be then used for insertion
 de.fub.bytecode.generic.InstructionHandle getCodeSubstPoint(java.lang.String[] instrGrp, int numInstr, java.lang.String[] origCodeStr)
          This method retrieves the point where code is to be substituted, provided we found the codebook instruction group in the app. code, else null is returned
 void getObjects(java.lang.String classfileName)
           
 int getOpaqueDeclPoint(int mIndex, opaquePred opaq)
          This method extracts a valid 'safe' point for opaque predicate declaration
 java.lang.String getTargetClassName()
           
 boolean remVecfreqUpdatesInThreshold(int numVectors, int currVecIndex, vectorUpdateCtrl vecObj)
          This method checks that the sideEffects of cloning a method is withing a particular threshold limit
 void setTargetClassName(java.lang.String className)
           
 void substituteNewCode(de.fub.bytecode.generic.InstructionHandle insertih, java.lang.String[] subInstr, int numInstr)
          This method is invoked from the newCode Insertion option
 java.lang.String transformCode(java.lang.String subInstr, java.lang.String className)
          Converts the received code to the actual code to be inserted by placing appropriate local variable indices etc etc
 void updateJarFileInfo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodNameSuffix

public static int methodNameSuffix

pObj

public de.fub.bytecode.classfile.ClassParser pObj

jcObj

public de.fub.bytecode.classfile.JavaClass jcObj

cgObj

public de.fub.bytecode.generic.ClassGen cgObj

cpObj

public de.fub.bytecode.classfile.ConstantPool cpObj

cpgObj

public de.fub.bytecode.generic.ConstantPoolGen cpgObj

mgObj

public de.fub.bytecode.generic.MethodGen mgObj

instrListObj

public de.fub.bytecode.generic.InstructionList instrListObj

putstaticObj

public de.fub.bytecode.generic.FieldInstruction putstaticObj

getstaticObj

public de.fub.bytecode.generic.FieldInstruction getstaticObj

naObj

public de.fub.bytecode.generic.NEWARRAY naObj

bipushObj

public de.fub.bytecode.generic.Instruction bipushObj

targetHandleObj

public de.fub.bytecode.generic.InstructionHandle targetHandleObj

ihEmbedStartObj

public de.fub.bytecode.generic.InstructionHandle ihEmbedStartObj

localIndexObj

public int localIndexObj

oldmethod

public de.fub.bytecode.classfile.Method oldmethod
Constructor Detail

objectUtil

objectUtil()
Method Detail

setTargetClassName

public void setTargetClassName(java.lang.String className)

getTargetClassName

public java.lang.String getTargetClassName()

extractInstrType

public de.fub.bytecode.generic.Instruction extractInstrType(java.lang.String instr)
This method takes the opcode of the instruction as a String and returns the corresponding 'Instruction' object which is to be then used for insertion


transformCode

public java.lang.String transformCode(java.lang.String subInstr,
                                      java.lang.String className)
Converts the received code to the actual code to be inserted by placing appropriate local variable indices etc etc


getOpaqueDeclPoint

public int getOpaqueDeclPoint(int mIndex,
                              opaquePred opaq)
This method extracts a valid 'safe' point for opaque predicate declaration


checkSplitVectorGrp

public boolean checkSplitVectorGrp(int instrIndex,
                                   de.fub.bytecode.generic.InstructionHandle[] instrHandles)
This method checks whether the code to be inserted splits any existing vector groups


remVecfreqUpdatesInThreshold

public boolean remVecfreqUpdatesInThreshold(int numVectors,
                                            int currVecIndex,
                                            vectorUpdateCtrl vecObj)
This method checks that the sideEffects of cloning a method is withing a particular threshold limit


getCodeSubstPoint

public de.fub.bytecode.generic.InstructionHandle getCodeSubstPoint(java.lang.String[] instrGrp,
                                                                   int numInstr,
                                                                   java.lang.String[] origCodeStr)
                                                            throws WatermarkingException,
                                                                   java.io.IOException,
                                                                   de.fub.bytecode.generic.TargetLostException
This method retrieves the point where code is to be substituted, provided we found the codebook instruction group in the app. code, else null is returned

WatermarkingException
java.io.IOException
de.fub.bytecode.generic.TargetLostException

substituteNewCode

public void substituteNewCode(de.fub.bytecode.generic.InstructionHandle insertih,
                              java.lang.String[] subInstr,
                              int numInstr)
This method is invoked from the newCode Insertion option


getObjects

public void getObjects(java.lang.String classfileName)

updateJarFileInfo

public void updateJarFileInfo()

SandMark version 2.1

Wed Jul 3 17:27:43 MST 2002