SandMark version 3.0


sandmark.watermark.ct.embed
Class DeleteMarkCalls

java.lang.Object
  |
  +--sandmark.watermark.ct.embed.DeleteMarkCalls

public class DeleteMarkCalls
extends java.lang.Object


Field Summary
(package private)  ClassFileCollection cfc
           
(package private)  java.util.Properties props
           
(package private)  java.lang.String watermarkClass
           
 
Constructor Summary
DeleteMarkCalls(ClassFileCollection cfc, java.util.Properties props)
           
 
Method Summary
(package private)  void delete()
          Delete all the calls to sandmark.watermark.ct.trace.Annotator.sm$mark(*) in every class in the program.
(package private)  boolean deleteMarkCall(EditedClass ec, de.fub.bytecode.generic.MethodGen mg, de.fub.bytecode.generic.INVOKESTATIC call, de.fub.bytecode.generic.InstructionHandle ih)
          Check if the given instruction is a call to sandmark.watermark.ct.trace.Annotator.sm$mark(*) If it is, replace it with a "NOP".
(package private)  boolean deleteMarkCalls(EditedClass ec)
          Delete all the calls to sandmark.watermark.ct.trace.Annotator.sm$mark(*) in every method in the given class.
(package private)  boolean deleteMarkCalls(EditedClass ec, de.fub.bytecode.generic.MethodGen mg)
          Delete every call to sandmark.watermark.ct.trace.Annotator.sm$mark(*) in the given method.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

java.util.Properties props

cfc

ClassFileCollection cfc

watermarkClass

java.lang.String watermarkClass
Constructor Detail

DeleteMarkCalls

public DeleteMarkCalls(ClassFileCollection cfc,
                       java.util.Properties props)
Method Detail

delete

void delete()
      throws java.io.IOException
Delete all the calls to sandmark.watermark.ct.trace.Annotator.sm$mark(*) in every class in the program. This is the main entry point to this class.

java.io.IOException

deleteMarkCalls

boolean deleteMarkCalls(EditedClass ec)
Delete all the calls to sandmark.watermark.ct.trace.Annotator.sm$mark(*) in every method in the given class.

Parameters:
ec - the class to be edited Return 'true' if the class was changed.

deleteMarkCalls

boolean deleteMarkCalls(EditedClass ec,
                        de.fub.bytecode.generic.MethodGen mg)
Delete every call to sandmark.watermark.ct.trace.Annotator.sm$mark(*) in the given method. Return 'true' if the method was changed.

Parameters:
ec - the class to be edited
mg - the method to be edited

deleteMarkCall

boolean deleteMarkCall(EditedClass ec,
                       de.fub.bytecode.generic.MethodGen mg,
                       de.fub.bytecode.generic.INVOKESTATIC call,
                       de.fub.bytecode.generic.InstructionHandle ih)
Check if the given instruction is a call to sandmark.watermark.ct.trace.Annotator.sm$mark(*) If it is, replace it with a "NOP". This way we don't have to worry about jumps to the removed instructions. The NOPs should be removed later. "sm$mark(String)" and "sm$mark(long)" are instead replaced by "POP". Ideally, we'd like to delete them too, but that is hard. Consider, for example, "sm$mark(k+x*4)".

Parameters:
ec - the class to be edited
mg - the method to be edited
call - the call instruction to be deleted
ih - the instruction handle of the call instruction Return 'true' if the method was changed.

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
java.io.IOException

SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003