1 11 package org.eclipse.jdi.internal.event; 12 13 14 import java.io.DataInputStream ; 15 import java.io.IOException ; 16 17 import org.eclipse.jdi.internal.MirrorImpl; 18 import org.eclipse.jdi.internal.ValueImpl; 19 import org.eclipse.jdi.internal.VirtualMachineImpl; 20 import org.eclipse.jdi.internal.request.RequestID; 21 22 import com.sun.jdi.Method; 23 import com.sun.jdi.Value; 24 import com.sun.jdi.event.MethodExitEvent; 25 26 32 public class MethodExitEventImpl extends LocatableEventImpl implements MethodExitEvent { 33 34 public static final byte EVENT_KIND = EVENT_METHOD_EXIT; 35 36 37 private Value fReturnValue = null; 38 39 42 private MethodExitEventImpl(VirtualMachineImpl vmImpl, RequestID requestID) { 43 super("MethodExitEvent", vmImpl, requestID); } 45 46 49 public static MethodExitEventImpl read(MirrorImpl target, RequestID requestID, DataInputStream dataInStream) throws IOException { 50 VirtualMachineImpl vmImpl = target.virtualMachineImpl(); 51 MethodExitEventImpl event = new MethodExitEventImpl(vmImpl, requestID); 52 event.readThreadAndLocation(target, dataInStream); 53 return event; 54 } 55 56 59 public static MethodExitEventImpl readWithReturnValue(MirrorImpl target, RequestID requestID, DataInputStream dataInStream) throws IOException { 60 VirtualMachineImpl vmImpl = target.virtualMachineImpl(); 61 MethodExitEventImpl event = new MethodExitEventImpl(vmImpl, requestID); 62 event.readThreadAndLocation(target, dataInStream); 63 event.fReturnValue = ValueImpl.readWithTag(target, dataInStream); 64 return event; 65 } 66 67 70 public Method method() { 71 return fLocation.method(); 72 } 73 74 78 public Value returnValue() { 79 return fReturnValue; 80 } 81 } 82 | Popular Tags |