20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.sun.source.tree;
27
28 import java.util.List;
29 import javax.tools.JavaFileObject;
30
31 /**
32 * Represents the abstract syntax tree for compilation units (source
33 * files) and package declarations (package-info.java).
34 *
35 * @jls sections 7.3, and 7.4
36 *
37 * @author Peter von der Ahé
38 * @since 1.6
39 */
40 @jdk.Supported
41 public interface CompilationUnitTree extends Tree {
42 List<? extends AnnotationTree> getPackageAnnotations();
43 ExpressionTree getPackageName();
44 List<? extends ImportTree> getImports();
45 List<? extends Tree> getTypeDecls();
46 JavaFileObject getSourceFile();
47
48 /**
49 * Gets the line map for this compilation unit, if available.
50 * Returns null if the line map is not available.
51 * @return the line map for this compilation unit
52 */
53 LineMap getLineMap();
54 }
|
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.sun.source.tree;
27
28 import java.util.List;
29 import javax.tools.JavaFileObject;
30
31 /**
32 * Represents the abstract syntax tree for compilation units (source
33 * files) and package declarations (package-info.java).
34 *
35 * @jls sections 7.3, and 7.4
36 *
37 * @author Peter von der Ahé
38 * @since 1.6
39 */
40 @jdk.Exported
41 public interface CompilationUnitTree extends Tree {
42 List<? extends AnnotationTree> getPackageAnnotations();
43 ExpressionTree getPackageName();
44 List<? extends ImportTree> getImports();
45 List<? extends Tree> getTypeDecls();
46 JavaFileObject getSourceFile();
47
48 /**
49 * Gets the line map for this compilation unit, if available.
50 * Returns null if the line map is not available.
51 * @return the line map for this compilation unit
52 */
53 LineMap getLineMap();
54 }
|