Compiler Package Overview

This table shows the packages that make up the compiler. Except as noted, all packages are in com.sun.tools.javac.*.

Main entry
(top level)
Control
api main
Compilation
parser comp processing jvm
Data
tree code model
Utilities
util file nio resources
API
javax.annotation.processing javax.lang.model javax.tools com.sun.source

Official API

javax.annotation.processing
Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.
javax.lang.model and subpackages
Classes and hierarchies of packages used to model the Java programming language.
javax.tools
Provides interfaces for tools which can be invoked from a program, for example, compilers.

Supported API

com.sun.source and subpackages
Representation of the compiler syntax trees.
(top level)
The javac main program and command-line entry point provides supported API for very simple invocation of the compiler.

Internal API and implementation classes

api
Implementation of JavaCompiler and other API in javax.tools.
code
Representation of the semantic elements of a Java program, such as symbols, scopes and types, implementing API in javax.lang.model.*.
comp
Primary processing phases for the compiler, such as attribution, flow analysis, "desugaring" and erasure.
file
Access to the native file system, including the implementation of javax.tools.StandardFileManager.
file
Access to the native file system using the java.nio.file API, including JavacPathFileManager.
jvm
Classes for reading and writing class files, and the code generation phase of the compiler.
main
Main driver code for any compilation. It provides option decoding and sequences through the various steps for compilation.
model
Additional implementation classes for javax.lang.model.*.
parser
Read Java source code to generate syntax trees.
processing
Implementation classes for annotation processing API defined in javax.annotation.processing.*.
resources
Resource files for localized messages and version info.
tree
Representation and utility classes for the compiler's syntax trees, implementing API in com.sun.source.*.
util
Basic utility classes, including support for reporting diagnostics.