Class CompilationUnit

java.lang.Object
org.aspectj.org.eclipse.jdt.core.dom.ASTNode
org.aspectj.org.eclipse.jdt.core.dom.CompilationUnit

public class CompilationUnit extends ASTNode
Java compilation unit AST node type. This is the type of the root of an AST. In JLS9 and later, this node can also contain a ModuleDeclaration (with a completely different grammar).

The source range for this type of node is ordinarily the entire source file, including leading and trailing whitespace and comments.

 CompilationUnit:
     OrdinaryCompilationUnit
     ModularCompilationUnit

 OrdinaryCompilationUnit:
     [ PackageDeclaration ]
         { ImportDeclaration }
         { TypeDeclaration | EnumDeclaration | AnnotationTypeDeclaration | ; }

 ModularCompilationUnit:
     {ImportDeclaration}
         ModuleDeclaration
 
Since:
2.0