1 22 23 package org.aspectj.debugger.request; 24 25 import org.aspectj.debugger.base.*; 26 27 import com.sun.jdi.*; 28 import com.sun.jdi.request.*; 29 30 38 39 public class UntraceMethodsRequest extends Request { 40 41 private String threadName; 42 43 public UntraceMethodsRequest(Debugger debugger, String threadName) { 44 super(debugger); 45 this.threadName = threadName; 46 } 47 48 public Object go() throws NoVMException, DebuggerException { 49 MethodEntryRequest entry = (MethodEntryRequest) new MethodEntryRequestAction(dbg(), threadName).go(); 50 MethodExitRequest exit = (MethodExitRequest) new MethodExitRequestAction(dbg(), threadName).go(); 51 return new EntryExitPair(entry, exit); 52 } 53 54 public static class EntryExitPair { 55 private MethodEntryRequest entry; 56 private MethodExitRequest exit; 57 public EntryExitPair(MethodEntryRequest entry, MethodExitRequest exit) { 58 this.entry = entry; 59 this.exit = exit; 60 } 61 public MethodEntryRequest getEntry() { 62 return entry; 63 } 64 public MethodExitRequest getExit() { 65 return exit; 66 } 67 public String toString() { 68 return "UNTRACE:\n\tEntry: " + entry + "\n\t" + "Exit: " + exit; 69 } 70 } 71 72 static class MethodEntryRequestAction extends ThreadRequestAction { 73 public MethodEntryRequestAction(Debugger debugger, String threadName) { 74 super(debugger, threadName); 75 } 76 public Object go() throws NoVMException, DebuggerException { 77 return unset(); 78 } 79 boolean isEnter() { 80 return true; 81 } 82 } 83 84 static class MethodExitRequestAction extends ThreadRequestAction { 85 public MethodExitRequestAction(Debugger debugger, String threadName) { 86 super(debugger, threadName); 87 } 88 public Object go() throws NoVMException, DebuggerException { 89 return unset(); 90 } 91 boolean isEnter() { 92 return false; 93 } 94 } 95 } 96 | Popular Tags |