1.1 --- a/src/share/classes/com/sun/tools/javac/tree/JCTree.java Tue Oct 09 19:10:00 2012 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/tree/JCTree.java Tue Oct 09 19:31:58 2012 -0700 1.3 @@ -464,32 +464,29 @@ 1.4 } 1.5 1.6 /** 1.7 - * Everything in one source file is kept in a TopLevel structure. 1.8 - * @param pid The tree representing the package clause. 1.9 - * @param sourcefile The source file name. 1.10 - * @param defs All definitions in this file (ClassDef, Import, and Skip) 1.11 - * @param packge The package it belongs to. 1.12 - * @param namedImportScope A scope for all named imports. 1.13 - * @param starImportScope A scope for all import-on-demands. 1.14 - * @param lineMap Line starting positions, defined only 1.15 - * if option -g is set. 1.16 - * @param docComments A hashtable that stores all documentation comments 1.17 - * indexed by the tree nodes they refer to. 1.18 - * defined only if option -s is set. 1.19 - * @param endPositions An object encapsulating ending positions of source 1.20 - * ranges indexed by the tree nodes they belong to. 1.21 - * Defined only if option -Xjcov is set. 1.22 + * Everything in one source file is kept in a {@linkplain JCCompilationUnit} structure. 1.23 */ 1.24 public static class JCCompilationUnit extends JCTree implements CompilationUnitTree { 1.25 public List<JCAnnotation> packageAnnotations; 1.26 + /** The tree representing the package clause. */ 1.27 public JCExpression pid; 1.28 + /** All definitions in this file (ClassDef, Import, and Skip) */ 1.29 public List<JCTree> defs; 1.30 + /* The source file name. */ 1.31 public JavaFileObject sourcefile; 1.32 + /** The package to which this compilation unit belongs. */ 1.33 public PackageSymbol packge; 1.34 + /** A scope for all named imports. */ 1.35 public ImportScope namedImportScope; 1.36 + /** A scope for all import-on-demands. */ 1.37 public StarImportScope starImportScope; 1.38 + /** Line starting positions, defined only if option -g is set. */ 1.39 public Position.LineMap lineMap = null; 1.40 + /** A table that stores all documentation comments indexed by the tree 1.41 + * nodes they refer to. defined only if option -s is set. */ 1.42 public DocCommentTable docComments = null; 1.43 + /* An object encapsulating ending positions of source ranges indexed by 1.44 + * the tree nodes they belong to. Defined only if option -Xjcov is set. */ 1.45 public EndPosTable endPositions = null; 1.46 protected JCCompilationUnit(List<JCAnnotation> packageAnnotations, 1.47 JCExpression pid, 1.48 @@ -550,10 +547,10 @@ 1.49 1.50 /** 1.51 * An import clause. 1.52 - * @param qualid The imported class(es). 1.53 */ 1.54 public static class JCImport extends JCTree implements ImportTree { 1.55 public boolean staticImport; 1.56 + /** The imported class(es). */ 1.57 public JCTree qualid; 1.58 protected JCImport(JCTree qualid, boolean importStatic) { 1.59 this.qualid = qualid; 1.60 @@ -605,21 +602,21 @@ 1.61 1.62 /** 1.63 * A class definition. 1.64 - * @param modifiers the modifiers 1.65 - * @param name the name of the class 1.66 - * @param typarams formal class parameters 1.67 - * @param extending the classes this class extends 1.68 - * @param implementing the interfaces implemented by this class 1.69 - * @param defs all variables and methods defined in this class 1.70 - * @param sym the symbol 1.71 */ 1.72 public static class JCClassDecl extends JCStatement implements ClassTree { 1.73 + /** the modifiers */ 1.74 public JCModifiers mods; 1.75 + /** the name of the class */ 1.76 public Name name; 1.77 + /** formal class parameters */ 1.78 public List<JCTypeParameter> typarams; 1.79 + /** the classes this class extends */ 1.80 public JCExpression extending; 1.81 + /** the interfaces implemented by this class */ 1.82 public List<JCExpression> implementing; 1.83 + /** all variables and methods defined in this class */ 1.84 public List<JCTree> defs; 1.85 + /** the symbol */ 1.86 public ClassSymbol sym; 1.87 protected JCClassDecl(JCModifiers mods, 1.88 Name name, 1.89 @@ -676,24 +673,25 @@ 1.90 1.91 /** 1.92 * A method definition. 1.93 - * @param modifiers method modifiers 1.94 - * @param name method name 1.95 - * @param restype type of method return value 1.96 - * @param typarams type parameters 1.97 - * @param params value parameters 1.98 - * @param thrown exceptions thrown by this method 1.99 - * @param stats statements in the method 1.100 - * @param sym method symbol 1.101 */ 1.102 public static class JCMethodDecl extends JCTree implements MethodTree { 1.103 + /** method modifiers */ 1.104 public JCModifiers mods; 1.105 + /** method name */ 1.106 public Name name; 1.107 + /** type of method return value */ 1.108 public JCExpression restype; 1.109 + /** type parameters */ 1.110 public List<JCTypeParameter> typarams; 1.111 + /** value parameters */ 1.112 public List<JCVariableDecl> params; 1.113 + /** exceptions thrown by this method */ 1.114 public List<JCExpression> thrown; 1.115 + /** statements in the method */ 1.116 public JCBlock body; 1.117 - public JCExpression defaultValue; // for annotation types 1.118 + /** default value, for annotation types */ 1.119 + public JCExpression defaultValue; 1.120 + /** method symbol */ 1.121 public MethodSymbol sym; 1.122 protected JCMethodDecl(JCModifiers mods, 1.123 Name name, 1.124 @@ -748,17 +746,17 @@ 1.125 1.126 /** 1.127 * A variable definition. 1.128 - * @param modifiers variable modifiers 1.129 - * @param name variable name 1.130 - * @param vartype type of the variable 1.131 - * @param init variables initial value 1.132 - * @param sym symbol 1.133 */ 1.134 public static class JCVariableDecl extends JCStatement implements VariableTree { 1.135 + /** variable modifiers */ 1.136 public JCModifiers mods; 1.137 + /** variable name */ 1.138 public Name name; 1.139 + /** type of the variable */ 1.140 public JCExpression vartype; 1.141 + /** variable's initial value */ 1.142 public JCExpression init; 1.143 + /** symbol */ 1.144 public VarSymbol sym; 1.145 protected JCVariableDecl(JCModifiers mods, 1.146 Name name, 1.147 @@ -815,11 +813,11 @@ 1.148 1.149 /** 1.150 * A statement block. 1.151 - * @param stats statements 1.152 - * @param flags flags 1.153 */ 1.154 public static class JCBlock extends JCStatement implements BlockTree { 1.155 + /** flags */ 1.156 public long flags; 1.157 + /** statements */ 1.158 public List<JCStatement> stats; 1.159 /** Position of closing brace, optional. */ 1.160 public int endpos = Position.NOPOS; 1.161 @@ -1206,9 +1204,9 @@ 1.162 1.163 /** 1.164 * an expression statement 1.165 - * @param expr expression structure 1.166 */ 1.167 public static class JCExpressionStatement extends JCStatement implements ExpressionStatementTree { 1.168 + /** expression structure */ 1.169 public JCExpression expr; 1.170 protected JCExpressionStatement(JCExpression expr) 1.171 { 1.172 @@ -1776,13 +1774,13 @@ 1.173 1.174 /** 1.175 * Selects through packages and classes 1.176 - * @param selected selected Tree hierarchie 1.177 - * @param selector name of field to select thru 1.178 - * @param sym symbol of the selected class 1.179 */ 1.180 public static class JCFieldAccess extends JCExpression implements MemberSelectTree { 1.181 + /** selected Tree hierarchy */ 1.182 public JCExpression selected; 1.183 + /** name of field to select thru */ 1.184 public Name name; 1.185 + /** symbol of the selected class */ 1.186 public Symbol sym; 1.187 protected JCFieldAccess(JCExpression selected, Name name, Symbol sym) { 1.188 this.selected = selected; 1.189 @@ -1885,11 +1883,11 @@ 1.190 1.191 /** 1.192 * An identifier 1.193 - * @param idname the name 1.194 - * @param sym the symbol 1.195 */ 1.196 public static class JCIdent extends JCExpression implements IdentifierTree { 1.197 + /** the name */ 1.198 public Name name; 1.199 + /** the symbol */ 1.200 public Symbol sym; 1.201 protected JCIdent(Name name, Symbol sym) { 1.202 this.name = name; 1.203 @@ -1912,10 +1910,10 @@ 1.204 1.205 /** 1.206 * A constant value given literally. 1.207 - * @param value value representation 1.208 */ 1.209 public static class JCLiteral extends JCExpression implements LiteralTree { 1.210 public int typetag; 1.211 + /** value representation */ 1.212 public Object value; 1.213 protected JCLiteral(int typetag, Object value) { 1.214 this.typetag = typetag; 1.215 @@ -1978,10 +1976,10 @@ 1.216 1.217 /** 1.218 * Identifies a basic type. 1.219 - * @param tag the basic type id 1.220 * @see TypeTags 1.221 */ 1.222 public static class JCPrimitiveTypeTree extends JCExpression implements PrimitiveTypeTree { 1.223 + /** the basic type id */ 1.224 public int typetag; 1.225 protected JCPrimitiveTypeTree(int typetag) { 1.226 this.typetag = typetag; 1.227 @@ -2105,11 +2103,11 @@ 1.228 1.229 /** 1.230 * A formal class parameter. 1.231 - * @param name name 1.232 - * @param bounds bounds 1.233 */ 1.234 public static class JCTypeParameter extends JCTree implements TypeParameterTree { 1.235 + /** name */ 1.236 public Name name; 1.237 + /** bounds */ 1.238 public List<JCExpression> bounds; 1.239 protected JCTypeParameter(Name name, List<JCExpression> bounds) { 1.240 this.name = name;