Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Compiler Tree API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.source.tree
Interface CompilationUnitTree

All Superinterfaces:
  Tree

    public interface CompilationUnitTree

extends Tree

Represents the abstract syntax tree for compilation units (source files) and package declarations (package-info.java).

Since:
  1.6
See Also:
  "The Java Language Specification, 3rd ed, sections 7.3, and 7.4"

Nested Class Summary

Nested classes/interfaces inherited from interface com.sun.source.tree.Tree
`Tree.Kind`

Method Summary
`List<? extends ImportTree>` | `getImports()`
`LineMap` | `getLineMap()` Gets the line map for this compilation unit, if available.
`List<? extends AnnotationTree>` | `getPackageAnnotations()`
`ExpressionTree` | `getPackageName()`
`JavaFileObject` | `getSourceFile()`
`List<? extends Tree>` | `getTypeDecls()`

Methods inherited from interface com.sun.source.tree.Tree
`accept, getKind`

Method Detail

### getPackageAnnotations

    List<? extends AnnotationTree> getPackageAnnotations()

### getPackageName

    ExpressionTree getPackageName()

### getImports

    List<? extends ImportTree> getImports()

### getTypeDecls

    List<? extends Tree> getTypeDecls()

### getSourceFile

    JavaFileObject getSourceFile()

### getLineMap

    LineMap getLineMap()

  Gets the line map for this compilation unit, if available. Returns null if the line map is not available.

  Returns:
    the line map for this compilation unit

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Compiler Tree API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Report a bug or request a feature.
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.