KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > mirror > util > SourcePosition


1 /*
2  * @(#)SourcePosition.java 1.2 04/07/16
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.mirror.util;
9
10
11 import java.io.File JavaDoc;
12
13
14 /**
15  * Represents a position in a source file.
16  *
17  * @author Joseph D. Darcy
18  * @author Scott Seligman
19  * @version 1.2 04/07/16
20  * @since 1.5
21  */

22
23 public interface SourcePosition {
24
25     /**
26      * Returns the source file containing this position.
27      *
28      * @return the source file containing this position; never null
29      */

30     File JavaDoc file();
31
32     /**
33      * Returns the line number of this position. Lines are numbered
34      * starting with 1.
35      *
36      * @return the line number of this position, or 0 if the line
37      * number is unknown or not applicable
38      */

39     int line();
40
41     /**
42      * Returns the column number of this position. Columns are numbered
43      * starting with 1.
44      *
45      * @return the column number of this position, or 0 if the column
46      * number is unknown or not applicable
47      */

48     int column();
49 }
50
Popular Tags