SandMark version 3.0


sandmark.watermark.objectwm
Class ObjectHelper

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

public class ObjectHelper
extends java.lang.Object

This class contains the support methods required by the "Insertion" and other *Util classes


Constructor Summary
(package private) ObjectHelper()
          constructor
 
Method Summary
 boolean codeMatch(java.lang.String[] str1, java.lang.String[] str2, int numInstr)
          Compares two instruction opcode in string format
static void display_VectorInfo(java.util.Vector vec, java.lang.String mesg)
          Displays watermark vector information
 java.lang.String extractShortFileName(java.lang.String classFile)
          extracts the short className from the full classFile name
 int getArgumentValInInstruction(java.lang.String instr)
          Extracts the argument val in the instruction
 java.lang.String getOpcode(java.lang.String instrCode)
          Extracts the opcode from the instruction
 java.lang.String getOpcodeFromInstr(java.lang.String instrCode)
          Extract the opcode from a verbose instruction
 int getRandomValue(int low, int high)
          returns a random value within specified boundary; taking values from low to high-1
 boolean isOfTypeBranch(de.fub.bytecode.generic.Instruction instr)
          overloaded from previous method
 boolean isOfTypeBranch(java.lang.String opcode)
          Returns true if the String is a branch statement, else returns false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectHelper

ObjectHelper()
constructor

Method Detail

getRandomValue

public int getRandomValue(int low,
                          int high)
returns a random value within specified boundary; taking values from low to high-1


codeMatch

public boolean codeMatch(java.lang.String[] str1,
                         java.lang.String[] str2,
                         int numInstr)
Compares two instruction opcode in string format


display_VectorInfo

public static void display_VectorInfo(java.util.Vector vec,
                                      java.lang.String mesg)
Displays watermark vector information


extractShortFileName

public java.lang.String extractShortFileName(java.lang.String classFile)
extracts the short className from the full classFile name


getOpcodeFromInstr

public java.lang.String getOpcodeFromInstr(java.lang.String instrCode)
Extract the opcode from a verbose instruction


getOpcode

public java.lang.String getOpcode(java.lang.String instrCode)
Extracts the opcode from the instruction


isOfTypeBranch

public boolean isOfTypeBranch(java.lang.String opcode)
Returns true if the String is a branch statement, else returns false


isOfTypeBranch

public boolean isOfTypeBranch(de.fub.bytecode.generic.Instruction instr)
overloaded from previous method


getArgumentValInInstruction

public int getArgumentValInInstruction(java.lang.String instr)
Extracts the argument val in the instruction


SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003