KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > source > tree > CompilationUnitTree


1 /*
2  * @(#)CompilationUnitTree.java 1.4 06/04/19
3  *
4  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  *
7  * Use and Distribution is subject to the Java Research License available
8  * at <http://wwws.sun.com/software/communitysource/jrl.html>.
9  */

10
11 package com.sun.source.tree;
12
13 import java.util.List JavaDoc;
14 import javax.tools.JavaFileObject;
15 import com.sun.source.tree.LineMap;
16
17 /**
18  * Represents the abstract syntax tree for compilation units (source
19  * files) and package declarations (package-info.java).
20  *
21  * @see "The Java Language Specification, 3rd ed, sections 7.3, and 7.4"
22  *
23  * @author Peter von der Ah&eacute;
24  * @since 1.6
25  */

26 public interface CompilationUnitTree extends Tree {
27     List JavaDoc<? extends AnnotationTree> getPackageAnnotations();
28     ExpressionTree getPackageName();
29     List JavaDoc<? extends ImportTree> getImports();
30     List JavaDoc<? extends Tree> getTypeDecls();
31     JavaFileObject getSourceFile();
32     
33     /**
34      * Gets the line map for this compilation unit, if available.
35      * Returns null if the line map is not available.
36      * @return the line map for this compilation unit
37      */

38     LineMap getLineMap();
39 }
40
Popular Tags