1 11 package org.eclipse.jdi.internal.event; 12 13 import java.io.DataInputStream ; 14 import java.io.IOException ; 15 16 import org.eclipse.jdi.internal.LocationImpl; 17 import org.eclipse.jdi.internal.MirrorImpl; 18 import org.eclipse.jdi.internal.ObjectReferenceImpl; 19 import org.eclipse.jdi.internal.ThreadReferenceImpl; 20 import org.eclipse.jdi.internal.ValueImpl; 21 import org.eclipse.jdi.internal.VirtualMachineImpl; 22 import org.eclipse.jdi.internal.request.RequestID; 23 24 import com.sun.jdi.BooleanValue; 25 import com.sun.jdi.ObjectReference; 26 import com.sun.jdi.event.MonitorWaitedEvent; 27 28 33 public class MonitorWaitedEventImpl extends LocatableEventImpl implements MonitorWaitedEvent { 34 35 36 public static final byte EVENT_KIND = EVENT_MONITOR_WAITED; 37 38 39 private boolean fTimedOut; 40 41 42 private ObjectReference fMonitor; 43 44 45 private MonitorWaitedEventImpl(VirtualMachineImpl vmImpl, RequestID requestID) { 46 super("MonitorWaited", vmImpl, requestID); } 48 49 52 public static MonitorWaitedEventImpl read(MirrorImpl target, RequestID requestID, DataInputStream dataInStream) throws IOException { 53 VirtualMachineImpl vmImpl = target.virtualMachineImpl(); 54 MonitorWaitedEventImpl event = new MonitorWaitedEventImpl(vmImpl, requestID); 55 event.fThreadRef = ThreadReferenceImpl.read(target, dataInStream); 56 event.fMonitor = ObjectReferenceImpl.readObjectRefWithTag(target, dataInStream); 57 event.fLocation = LocationImpl.read(target, dataInStream); 58 event.fTimedOut = ((BooleanValue)ValueImpl.readWithTag(target, dataInStream)).value(); 59 return event; 60 } 61 62 65 public ObjectReference monitor() { 66 return fMonitor; 67 } 68 69 72 public boolean timedout() { 73 return fTimedOut; 74 } 75 76 } 77 | Popular Tags |