KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdi > internal > event > LocatableEventImpl


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdi.internal.event;
12
13
14 import java.io.DataInputStream JavaDoc;
15 import java.io.IOException JavaDoc;
16
17 import org.eclipse.jdi.internal.LocationImpl;
18 import org.eclipse.jdi.internal.MirrorImpl;
19 import org.eclipse.jdi.internal.ThreadReferenceImpl;
20 import org.eclipse.jdi.internal.VirtualMachineImpl;
21 import org.eclipse.jdi.internal.request.RequestID;
22
23 import com.sun.jdi.Locatable;
24 import com.sun.jdi.Location;
25
26 /**
27  * This class implements the corresponding interfaces
28  * declared by the JDI specification. See the com.sun.jdi package
29  * for more information.
30  *
31  */

32 public abstract class LocatableEventImpl extends EventImpl implements Locatable {
33     /** Location where event occurred. */
34     protected LocationImpl fLocation;
35     
36     /**
37      * Creates new LocatableEventImpl, only used by subclasses.
38      */

39     protected LocatableEventImpl(String JavaDoc description, VirtualMachineImpl vmImpl, RequestID requestID) {
40         super(description, vmImpl, requestID);
41     }
42     
43     /**
44      * Reads Thread and Location.
45      */

46     public void readThreadAndLocation(MirrorImpl target, DataInputStream JavaDoc dataInStream) throws IOException JavaDoc {
47         fThreadRef = ThreadReferenceImpl.read(target, dataInStream);
48         fLocation = LocationImpl.read(target, dataInStream);
49     }
50     
51     /**
52      * @return Returns Location where event occurred.
53      */

54     public Location location() {
55         return fLocation;
56     }
57 }
58
Popular Tags