1 /* |
1 /* |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package com.sun.tools.javac.tree; |
26 package com.sun.tools.javac.tree; |
27 |
27 |
28 import java.util.*; |
|
29 |
|
30 import java.io.IOException; |
28 import java.io.IOException; |
31 import java.io.StringWriter; |
29 import java.io.StringWriter; |
|
30 import java.util.*; |
|
31 |
32 import javax.lang.model.element.Modifier; |
32 import javax.lang.model.element.Modifier; |
33 import javax.lang.model.type.TypeKind; |
33 import javax.lang.model.type.TypeKind; |
34 import javax.tools.JavaFileObject; |
34 import javax.tools.JavaFileObject; |
35 |
35 |
|
36 import com.sun.source.tree.*; |
|
37 import com.sun.source.tree.LambdaExpressionTree.BodyKind; |
|
38 import com.sun.source.tree.MemberReferenceTree.ReferenceMode; |
|
39 import com.sun.tools.javac.code.*; |
|
40 import com.sun.tools.javac.code.Scope.*; |
|
41 import com.sun.tools.javac.code.Symbol.*; |
36 import com.sun.tools.javac.util.*; |
42 import com.sun.tools.javac.util.*; |
37 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; |
43 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; |
38 import com.sun.tools.javac.util.List; |
44 import com.sun.tools.javac.util.List; |
39 import com.sun.tools.javac.code.*; |
|
40 import com.sun.tools.javac.code.Scope.*; |
|
41 import com.sun.tools.javac.code.Symbol.*; |
|
42 import com.sun.tools.javac.parser.EndPosTable; |
|
43 import com.sun.source.tree.*; |
|
44 import com.sun.source.tree.LambdaExpressionTree.BodyKind; |
|
45 import com.sun.source.tree.MemberReferenceTree.ReferenceMode; |
|
46 |
|
47 import static com.sun.tools.javac.code.BoundKind.*; |
45 import static com.sun.tools.javac.code.BoundKind.*; |
48 import static com.sun.tools.javac.tree.JCTree.Tag.*; |
46 import static com.sun.tools.javac.tree.JCTree.Tag.*; |
49 |
47 |
50 /** |
48 /** |
51 * Root class for abstract syntax tree nodes. It provides definitions |
49 * Root class for abstract syntax tree nodes. It provides definitions |
489 public JavaFileObject sourcefile; |
487 public JavaFileObject sourcefile; |
490 public PackageSymbol packge; |
488 public PackageSymbol packge; |
491 public ImportScope namedImportScope; |
489 public ImportScope namedImportScope; |
492 public StarImportScope starImportScope; |
490 public StarImportScope starImportScope; |
493 public Position.LineMap lineMap = null; |
491 public Position.LineMap lineMap = null; |
494 public Map<JCTree, String> docComments = null; |
492 public DocCommentTable docComments = null; |
495 public EndPosTable endPositions = null; |
493 public EndPosTable endPositions = null; |
496 protected JCCompilationUnit(List<JCAnnotation> packageAnnotations, |
494 protected JCCompilationUnit(List<JCAnnotation> packageAnnotations, |
497 JCExpression pid, |
495 JCExpression pid, |
498 List<JCTree> defs, |
496 List<JCTree> defs, |
499 JavaFileObject sourcefile, |
497 JavaFileObject sourcefile, |