01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdi.internal.event;
11:
12: import java.io.DataInputStream;
13: import java.io.IOException;
14:
15: import org.eclipse.jdi.internal.MirrorImpl;
16: import org.eclipse.jdi.internal.VirtualMachineImpl;
17: import org.eclipse.jdi.internal.request.RequestID;
18:
19: import com.sun.jdi.event.AccessWatchpointEvent;
20:
21: /**
22: * this class implements the corresponding interfaces
23: * declared by the JDI specification. See the com.sun.jdi package
24: * for more information.
25: *
26: */
27: public class AccessWatchpointEventImpl extends WatchpointEventImpl
28: implements AccessWatchpointEvent {
29: /** Jdwp Event Kind. */
30: public static final byte EVENT_KIND = EVENT_FIELD_ACCESS;
31:
32: /**
33: * Creates new AccessWatchpointEventImpl.
34: */
35: protected AccessWatchpointEventImpl(VirtualMachineImpl vmImpl,
36: RequestID requestID) {
37: super ("AccessWatchpointEvent", vmImpl, requestID); //$NON-NLS-1$
38: }
39:
40: /**
41: * @return Creates, reads and returns new EventImpl, of which requestID has already been read.
42: */
43: public static WatchpointEventImpl read(MirrorImpl target,
44: RequestID requestID, DataInputStream dataInStream)
45: throws IOException {
46: VirtualMachineImpl vmImpl = target.virtualMachineImpl();
47: AccessWatchpointEventImpl event = new AccessWatchpointEventImpl(
48: vmImpl, requestID);
49: event.readWatchpointEventFields(target, dataInStream);
50: return event;
51: }
52: }
|