Source code: netscape/jsdebug/SourceLocation.java
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 *
3 * The contents of this file are subject to the Netscape Public
4 * License Version 1.1 (the "License"); you may not use this file
5 * except in compliance with the License. You may obtain a copy of
6 * the License at http://www.mozilla.org/NPL/
7 *
8 * Software distributed under the License is distributed on an "AS
9 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10 * implied. See the License for the specific language governing
11 * rights and limitations under the License.
12 *
13 * The Original Code is mozilla.org code.
14 *
15 * The Initial Developer of the Original Code is Netscape
16 * Communications Corporation. Portions created by Netscape are
17 * Copyright (C) 1998 Netscape Communications Corporation. All
18 * Rights Reserved.
19 *
20 * Contributor(s):
21 */
22
23 package netscape.jsdebug;
24
25 /**
26 * An implementation of the SourceLocation interface is used to represent
27 * a location in a source file. Java classfiles only make source locations
28 * available at the line-by-line granularity, but other languages may
29 * include finer-grain information. At this time only line number
30 * information is included.
31 *
32 * @author John Bandhauer
33 * @author Nick Thompson
34 * @version 1.0
35 * @since 1.0
36 */
37 /* XXX must source locations be contiguous? */
38 public abstract class SourceLocation {
39 /**
40 * Gets the first line number associated with this SourceLocation.
41 * This is the lowest common denominator information that will be
42 * available: some implementations may choose to include more
43 * specific location information in a subclass of SourceLocation.
44 *
45 * @returns source line number cooresponding to this location
46 */
47 public abstract int getLine();
48
49 /**
50 * Get the first PC associated with a given SourceLocation.
51 * This is the place to set a breakpoint at that location.
52 *
53 * @returns pc object or null if there is no code corresponding
54 * to this source location.
55 */
56 public abstract PC getPC();
57 }