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.LocationImpl; 18 import org.eclipse.jdi.internal.MirrorImpl; 19 import org.eclipse.jdi.internal.ObjectReferenceImpl; 20 import org.eclipse.jdi.internal.VirtualMachineImpl; 21 import org.eclipse.jdi.internal.request.RequestID; 22 23 import com.sun.jdi.Location; 24 import com.sun.jdi.ObjectReference; 25 import com.sun.jdi.event.ExceptionEvent; 26 27 33 public class ExceptionEventImpl extends LocatableEventImpl implements ExceptionEvent { 34 35 public static final byte EVENT_KIND = EVENT_EXCEPTION; 36 37 38 private ObjectReferenceImpl fException; 39 40 private LocationImpl fCatchLocation; 41 42 45 private ExceptionEventImpl(VirtualMachineImpl vmImpl, RequestID requestID) { 46 super("ExceptionEvent", vmImpl, requestID); } 48 49 52 public static ExceptionEventImpl read(MirrorImpl target, RequestID requestID, DataInputStream dataInStream) throws IOException { 53 VirtualMachineImpl vmImpl = target.virtualMachineImpl(); 54 ExceptionEventImpl event = new ExceptionEventImpl(vmImpl, requestID); 55 event.readThreadAndLocation(target, dataInStream); 56 event.fException = ObjectReferenceImpl.readObjectRefWithTag(target, dataInStream); 57 event.fCatchLocation = LocationImpl.read(target, dataInStream); 58 return event; 59 } 60 61 64 public Location catchLocation() { 65 return fCatchLocation; 66 } 67 68 71 public ObjectReference exception() { 72 return fException; 73 } 74 } 75 | Popular Tags |