1 22 23 package org.aspectj.debugger.request; 24 25 import org.aspectj.debugger.base.*; 26 27 import com.sun.jdi.*; 28 29 37 38 public class SetRequest extends ExpressionGettingRequest { 39 40 private Object lvalue; 41 42 public SetRequest(Debugger debugger, Object lvalue, Object rvalue) { 43 super(debugger, rvalue); 44 this.lvalue = lvalue; 45 } 46 47 public Object go() throws NoVMException, DebuggerException { 48 Value value = getValue(); 49 StackFrame frame = dbg().getDefaultFrame(); 50 LocalVariable local = eval().getLocalVariable(lvalue, frame); 51 try { 52 frame.setValue(local, value); 53 } catch (InvalidTypeException ite) { 54 throw new DebuggerException(ite); 55 } catch (ClassNotLoadedException cnle) { 56 throw new DebuggerException(cnle); 57 } 58 return frame.getValue(local); 59 } 60 } 61 | Popular Tags |