SandMark version 3.0


sandmark.watermark.objectwm
Class ObjectUtil

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

public class ObjectUtil
extends java.lang.Object

This class implements all the APIs required by the main insertion methods


Field Summary
 de.fub.bytecode.generic.ClassGen cgObj
           
 de.fub.bytecode.generic.ConstantPoolGen cpgObj
           
 de.fub.bytecode.classfile.ConstantPool cpObj
           
 de.fub.bytecode.generic.InstructionList instrListObj
           
 de.fub.bytecode.classfile.JavaClass jcObj
           
 de.fub.bytecode.generic.MethodGen mgObj
           
 de.fub.bytecode.classfile.Method oldmethod
           
 de.fub.bytecode.classfile.ClassParser pObj
           
 de.fub.bytecode.generic.InstructionHandle targetHandleObj
           
 
Constructor Summary
ObjectUtil()
           
 
Method Summary
 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; 'instr' is complete ie. contains all the actual end parameters
 int getIndexOfHandle(de.fub.bytecode.generic.InstructionHandle instrHandle)
          Retrieves the index of a given instructionHandle
 int getNumberOfClasses(ClassFileCollection cfc)
           
 int getNumberOfInstanceOfGroup(de.fub.bytecode.generic.MethodGen mg, java.lang.String[] instrStrGrp, int numInstr)
          Returns the number of instances of a group of instrcutions in a particular method
 int getNumberOfInstructionsInMethod(de.fub.bytecode.generic.MethodGen mg)
          Returns the number of instructions in the method
 void getObjects(java.lang.String classfileName)
          Initializes the various class/method objects while selecting a method for access
 int getTargerterIndices(int lowerIndexLimit, int[] targetIndices)
          this method returns the current targeter points in the code above the lowerIndexLimit point ; returns the number of points, and the indices are stored in the output parameter 'targetIndices'
 java.lang.String getTargetClassName()
           
 int[] getTargeterPointsInRange(int low, int high, de.fub.bytecode.generic.InstructionList instrList)
          Returns the targeter indices within a given range of indices
 void setTargetClassName(java.lang.String className)
           
 boolean skipMethod(de.fub.bytecode.generic.MethodGen mg)
          skips the method whose parameter type is outside the range of types implemented
 void updateJarFileInfo()
          Committing the final changes into the jar file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

targetHandleObj

public de.fub.bytecode.generic.InstructionHandle targetHandleObj

oldmethod

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

ObjectUtil

public 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; 'instr' is complete ie. contains all the actual end parameters


skipMethod

public boolean skipMethod(de.fub.bytecode.generic.MethodGen mg)
skips the method whose parameter type is outside the range of types implemented


getNumberOfInstanceOfGroup

public int getNumberOfInstanceOfGroup(de.fub.bytecode.generic.MethodGen mg,
                                      java.lang.String[] instrStrGrp,
                                      int numInstr)
Returns the number of instances of a group of instrcutions in a particular method


getTargeterPointsInRange

public int[] getTargeterPointsInRange(int low,
                                      int high,
                                      de.fub.bytecode.generic.InstructionList instrList)
Returns the targeter indices within a given range of indices


getIndexOfHandle

public int getIndexOfHandle(de.fub.bytecode.generic.InstructionHandle instrHandle)
Retrieves the index of a given instructionHandle


getTargerterIndices

public int getTargerterIndices(int lowerIndexLimit,
                               int[] targetIndices)
this method returns the current targeter points in the code above the lowerIndexLimit point ; returns the number of points, and the indices are stored in the output parameter 'targetIndices'


getNumberOfInstructionsInMethod

public int getNumberOfInstructionsInMethod(de.fub.bytecode.generic.MethodGen mg)
Returns the number of instructions in the method


getNumberOfClasses

public int getNumberOfClasses(ClassFileCollection cfc)

getObjects

public void getObjects(java.lang.String classfileName)
Initializes the various class/method objects while selecting a method for access


updateJarFileInfo

public void updateJarFileInfo()
Committing the final changes into the jar file


SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003