1 2 package org.quilt.cover.stmt; 3 4 import org.apache.bcel.generic.*; 5 6 19 public class MethodAction implements org.quilt.cl.MethodXformer { 20 21 22 private static StmtRegistry stmtReg; 23 24 25 private static String name_ = null; 26 27 private ClassGen clazz_ = null; 28 private MethodGen method_ = null; 29 private InstructionList ilist_ = null; 30 31 public MethodAction () { 32 } 33 public MethodAction(StmtRegistry reg) { 34 stmtReg = reg; 35 setName(this.getClass().getName()); 36 } 37 38 private void dumpIList() { 39 ilist_ = method_.getInstructionList(); 40 if (ilist_ != null) { 41 int i = 0; 42 for (InstructionHandle ih = ilist_.getStart(); ih != null; 43 ih = ih.getNext() ) { 44 System.out.println(" " + (i++) + " " + ih.getInstruction()); 45 } 46 } 47 } 48 51 public void preGraph( ClassGen clazz, MethodGen method) { 52 clazz_ = clazz; 53 method_ = method; 54 } 55 59 public void postGraph( ClassGen clazz, MethodGen method) { 60 clazz_ = clazz; 61 method_ = method; 62 } 63 64 66 public String getName () { 67 return name_; 68 } 69 70 public void setName (String name) { 71 name_ = name; 72 } 73 } 74 | Popular Tags |