public static class JCTree.JCCompilationUnit extends JCTree implements CompilationUnitTree
JCTree.Factory, JCTree.JCAnnotatedType, JCTree.JCAnnotation, JCTree.JCArrayAccess, JCTree.JCArrayTypeTree, JCTree.JCAssert, JCTree.JCAssign, JCTree.JCAssignOp, JCTree.JCBinary, JCTree.JCBlock, JCTree.JCBreak, JCTree.JCCase, JCTree.JCCatch, JCTree.JCClassDecl, JCTree.JCCompilationUnit, JCTree.JCConditional, JCTree.JCContinue, JCTree.JCDoWhileLoop, JCTree.JCEnhancedForLoop, JCTree.JCErroneous, JCTree.JCExpression, JCTree.JCExpressionStatement, JCTree.JCFieldAccess, JCTree.JCForLoop, JCTree.JCFunctionalExpression, JCTree.JCIdent, JCTree.JCIf, JCTree.JCImport, JCTree.JCInstanceOf, JCTree.JCLabeledStatement, JCTree.JCLambda, JCTree.JCLiteral, JCTree.JCMemberReference, JCTree.JCMethodDecl, JCTree.JCMethodInvocation, JCTree.JCModifiers, JCTree.JCNewArray, JCTree.JCNewClass, JCTree.JCParens, JCTree.JCPolyExpression, JCTree.JCPrimitiveTypeTree, JCTree.JCReturn, JCTree.JCSkip, JCTree.JCStatement, JCTree.JCSwitch, JCTree.JCSynchronized, JCTree.JCThrow, JCTree.JCTry, JCTree.JCTypeApply, JCTree.JCTypeCast, JCTree.JCTypeIntersection, JCTree.JCTypeParameter, JCTree.JCTypeUnion, JCTree.JCUnary, JCTree.JCVariableDecl, JCTree.JCWhileLoop, JCTree.JCWildcard, JCTree.LetExpr, JCTree.Tag, JCTree.TypeBoundKind, JCTree.Visitor
Modifier and Type | Field and Description |
---|---|
List<JCTree> |
defs
All definitions in this file (ClassDef, Import, and Skip)
|
DocCommentTable |
docComments
A table that stores all documentation comments indexed by the tree
nodes they refer to.
|
EndPosTable |
endPositions |
Position.LineMap |
lineMap
Line starting positions, defined only if option -g is set.
|
Scope.ImportScope |
namedImportScope
A scope for all named imports.
|
List<JCTree.JCAnnotation> |
packageAnnotations |
Symbol.PackageSymbol |
packge
The package to which this compilation unit belongs.
|
JCTree.JCExpression |
pid
The tree representing the package clause.
|
JavaFileObject |
sourcefile |
Scope.StarImportScope |
starImportScope
A scope for all import-on-demands.
|
Modifier | Constructor and Description |
---|---|
protected |
JCCompilationUnit(List<JCTree.JCAnnotation> packageAnnotations,
JCTree.JCExpression pid,
List<JCTree> defs,
JavaFileObject sourcefile,
Symbol.PackageSymbol packge,
Scope.ImportScope namedImportScope,
Scope.StarImportScope starImportScope) |
Modifier and Type | Method and Description |
---|---|
void |
accept(JCTree.Visitor v)
Visit this tree with a given visitor.
|
<R,D> R |
accept(TreeVisitor<R,D> v,
D d)
Accept method used to implement the visitor pattern.
|
List<JCTree.JCImport> |
getImports() |
Tree.Kind |
getKind()
Gets the kind of this tree.
|
Position.LineMap |
getLineMap()
Gets the line map for this compilation unit, if available.
|
List<JCTree.JCAnnotation> |
getPackageAnnotations() |
JCTree.JCExpression |
getPackageName() |
JavaFileObject |
getSourceFile() |
JCTree.Tag |
getTag() |
List<JCTree> |
getTypeDecls() |
clone, getEndPosition, getPreferredPosition, getStartPosition, getTree, hasTag, pos, setPos, setType, toString
public List<JCTree.JCAnnotation> packageAnnotations
public JCTree.JCExpression pid
public JavaFileObject sourcefile
public Symbol.PackageSymbol packge
public Scope.ImportScope namedImportScope
public Scope.StarImportScope starImportScope
public Position.LineMap lineMap
public DocCommentTable docComments
public EndPosTable endPositions
protected JCCompilationUnit(List<JCTree.JCAnnotation> packageAnnotations, JCTree.JCExpression pid, List<JCTree> defs, JavaFileObject sourcefile, Symbol.PackageSymbol packge, Scope.ImportScope namedImportScope, Scope.StarImportScope starImportScope)
public void accept(JCTree.Visitor v)
JCTree
public Tree.Kind getKind()
Tree
public List<JCTree.JCAnnotation> getPackageAnnotations()
getPackageAnnotations
in interface CompilationUnitTree
public List<JCTree.JCImport> getImports()
getImports
in interface CompilationUnitTree
public JCTree.JCExpression getPackageName()
getPackageName
in interface CompilationUnitTree
public JavaFileObject getSourceFile()
getSourceFile
in interface CompilationUnitTree
public Position.LineMap getLineMap()
CompilationUnitTree
getLineMap
in interface CompilationUnitTree
public List<JCTree> getTypeDecls()
getTypeDecls
in interface CompilationUnitTree
public <R,D> R accept(TreeVisitor<R,D> v, D d)
Tree
public JCTree.Tag getTag()
Copyright © 2015. All rights reserved.