KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > javadoc > SourcePosition


1 /*
2  * @(#)SourcePosition.java 1.9 03/12/19
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.javadoc;
9
10 import java.io.File JavaDoc;
11
12 /**
13  * This interface describes a source position: filename, line number,
14  * and column number.
15  *
16  * @since 1.4
17  * @author Neal M Gafter
18  */

19 public interface SourcePosition {
20     /** The source file. Returns null if no file information is
21      * available. */

22     File JavaDoc file();
23
24     /** The line in the source file. The first line is numbered 1;
25      * 0 means no line number information is available. */

26     int line();
27
28     /** The column in the source file. The first column is
29      * numbered 1; 0 means no column information is available.
30      * Columns count characters in the input stream; a tab
31      * advances the column number to the next 8-column tab stop.
32      */

33     int column();
34
35     /** Convert the source position to the form "Filename:line". */
36     String JavaDoc toString();
37 }
38
Popular Tags