KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > declaration > SourcePosition


1 package spoon.reflect.declaration;
2
3 import java.io.File JavaDoc;
4
5 /**
6  * This interface represents the position of a program element in a source file.
7  */

8 public interface SourcePosition extends Cloneable JavaDoc {
9
10     /**
11      * Returns a string representation of this position in the form
12      * "sourcefile:line", or "sourcefile" if no line number is available.
13      */

14     String JavaDoc toString();
15
16     /**
17      * Gets the source file (path is relative to the working directory).
18      */

19     File JavaDoc getFile();
20
21     /**
22      * Gets the line in the source file.
23      */

24     int getLine();
25
26     /**
27      * Gets the column in the source file.
28      */

29     int getColumn();
30
31     /**
32      * Clones this position.
33      */

34     Object JavaDoc clone() throws CloneNotSupportedException JavaDoc;
35
36     /**
37      * Gets the index at which the position ends in the source file.
38      */

39     int getSourceEnd();
40
41     /**
42      * Gets the index at which the position starts in the source file.
43      */

44     int getSourceStart();
45
46
47 }
48
Popular Tags