langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DCTree.java
changeset 26266 2d24bda701dc
parent 25874 83c19f00452c
child 28334 1633de6070ae
equal deleted inserted replaced
26265:46aacfffd3b5 26266:2d24bda701dc
    29 import javax.tools.Diagnostic;
    29 import javax.tools.Diagnostic;
    30 
    30 
    31 import com.sun.source.doctree.*;
    31 import com.sun.source.doctree.*;
    32 import com.sun.tools.javac.parser.Tokens.Comment;
    32 import com.sun.tools.javac.parser.Tokens.Comment;
    33 import com.sun.tools.javac.util.Assert;
    33 import com.sun.tools.javac.util.Assert;
       
    34 import com.sun.tools.javac.util.DefinedBy;
       
    35 import com.sun.tools.javac.util.DefinedBy.Api;
    34 import com.sun.tools.javac.util.DiagnosticSource;
    36 import com.sun.tools.javac.util.DiagnosticSource;
    35 import com.sun.tools.javac.util.JCDiagnostic;
    37 import com.sun.tools.javac.util.JCDiagnostic;
    36 import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition;
    38 import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition;
    37 import com.sun.tools.javac.util.List;
    39 import com.sun.tools.javac.util.List;
    38 import com.sun.tools.javac.util.Name;
    40 import com.sun.tools.javac.util.Name;
   112             this.firstSentence = firstSentence;
   114             this.firstSentence = firstSentence;
   113             this.body = body;
   115             this.body = body;
   114             this.tags = tags;
   116             this.tags = tags;
   115         }
   117         }
   116 
   118 
       
   119         @DefinedBy(Api.COMPILER_TREE)
   117         public Kind getKind() {
   120         public Kind getKind() {
   118             return Kind.DOC_COMMENT;
   121             return Kind.DOC_COMMENT;
   119         }
   122         }
   120 
   123 
       
   124         @DefinedBy(Api.COMPILER_TREE)
   121         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   125         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   122             return v.visitDocComment(this, d);
   126             return v.visitDocComment(this, d);
   123         }
   127         }
   124 
   128 
       
   129         @DefinedBy(Api.COMPILER_TREE)
   125         public List<? extends DocTree> getFirstSentence() {
   130         public List<? extends DocTree> getFirstSentence() {
   126             return firstSentence;
   131             return firstSentence;
   127         }
   132         }
   128 
   133 
       
   134         @DefinedBy(Api.COMPILER_TREE)
   129         public List<? extends DocTree> getBody() {
   135         public List<? extends DocTree> getBody() {
   130             return body;
   136             return body;
   131         }
   137         }
   132 
   138 
       
   139         @DefinedBy(Api.COMPILER_TREE)
   133         public List<? extends DocTree> getBlockTags() {
   140         public List<? extends DocTree> getBlockTags() {
   134             return tags;
   141             return tags;
   135         }
   142         }
   136 
   143 
   137     }
   144     }
   138 
   145 
   139     public static abstract class DCBlockTag extends DCTree implements BlockTagTree {
   146     public static abstract class DCBlockTag extends DCTree implements BlockTagTree {
       
   147         @DefinedBy(Api.COMPILER_TREE)
   140         public String getTagName() {
   148         public String getTagName() {
   141             return getKind().tagName;
   149             return getKind().tagName;
   142         }
   150         }
   143     }
   151     }
   144 
   152 
   145     public static abstract class DCInlineTag extends DCEndPosTree<DCInlineTag> implements InlineTagTree {
   153     public static abstract class DCInlineTag extends DCEndPosTree<DCInlineTag> implements InlineTagTree {
       
   154         @DefinedBy(Api.COMPILER_TREE)
   146         public String getTagName() {
   155         public String getTagName() {
   147             return getKind().tagName;
   156             return getKind().tagName;
   148         }
   157         }
   149     }
   158     }
   150 
   159 
   158             this.name = name;
   167             this.name = name;
   159             this.vkind = vkind;
   168             this.vkind = vkind;
   160             this.value = value;
   169             this.value = value;
   161         }
   170         }
   162 
   171 
   163         @Override
   172         @Override @DefinedBy(Api.COMPILER_TREE)
   164         public Kind getKind() {
   173         public Kind getKind() {
   165             return Kind.ATTRIBUTE;
   174             return Kind.ATTRIBUTE;
   166         }
   175         }
   167 
   176 
   168         @Override
   177         @Override @DefinedBy(Api.COMPILER_TREE)
   169         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   178         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   170             return v.visitAttribute(this, d);
   179             return v.visitAttribute(this, d);
   171         }
   180         }
   172 
   181 
   173         @Override
   182         @Override @DefinedBy(Api.COMPILER_TREE)
   174         public Name getName() {
   183         public Name getName() {
   175             return name;
   184             return name;
   176         }
   185         }
   177 
   186 
   178         @Override
   187         @Override @DefinedBy(Api.COMPILER_TREE)
   179         public ValueKind getValueKind() {
   188         public ValueKind getValueKind() {
   180             return vkind;
   189             return vkind;
   181         }
   190         }
   182 
   191 
   183         @Override
   192         @Override @DefinedBy(Api.COMPILER_TREE)
   184         public List<DCTree> getValue() {
   193         public List<DCTree> getValue() {
   185             return value;
   194             return value;
   186         }
   195         }
   187     }
   196     }
   188 
   197 
   191 
   200 
   192         DCAuthor(List<DCTree> name) {
   201         DCAuthor(List<DCTree> name) {
   193             this.name = name;
   202             this.name = name;
   194         }
   203         }
   195 
   204 
   196         @Override
   205         @Override @DefinedBy(Api.COMPILER_TREE)
   197         public Kind getKind() {
   206         public Kind getKind() {
   198             return Kind.AUTHOR;
   207             return Kind.AUTHOR;
   199         }
   208         }
   200 
   209 
   201         @Override
   210         @Override @DefinedBy(Api.COMPILER_TREE)
   202         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   211         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   203             return v.visitAuthor(this, d);
   212             return v.visitAuthor(this, d);
   204         }
   213         }
   205 
   214 
   206         @Override
   215         @Override @DefinedBy(Api.COMPILER_TREE)
   207         public List<? extends DocTree> getName() {
   216         public List<? extends DocTree> getName() {
   208             return name;
   217             return name;
   209         }
   218         }
   210     }
   219     }
   211 
   220 
   214 
   223 
   215         DCComment(String body) {
   224         DCComment(String body) {
   216             this.body = body;
   225             this.body = body;
   217         }
   226         }
   218 
   227 
   219         @Override
   228         @Override @DefinedBy(Api.COMPILER_TREE)
   220         public Kind getKind() {
   229         public Kind getKind() {
   221             return Kind.COMMENT;
   230             return Kind.COMMENT;
   222         }
   231         }
   223 
   232 
   224         @Override
   233         @Override @DefinedBy(Api.COMPILER_TREE)
   225         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   234         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   226             return v.visitComment(this, d);
   235             return v.visitComment(this, d);
   227         }
   236         }
   228 
   237 
   229         @Override
   238         @Override @DefinedBy(Api.COMPILER_TREE)
   230         public String getBody() {
   239         public String getBody() {
   231             return body;
   240             return body;
   232         }
   241         }
   233     }
   242     }
   234 
   243 
   237 
   246 
   238         DCDeprecated(List<DCTree> body) {
   247         DCDeprecated(List<DCTree> body) {
   239             this.body = body;
   248             this.body = body;
   240         }
   249         }
   241 
   250 
   242         @Override
   251         @Override @DefinedBy(Api.COMPILER_TREE)
   243         public Kind getKind() {
   252         public Kind getKind() {
   244             return Kind.DEPRECATED;
   253             return Kind.DEPRECATED;
   245         }
   254         }
   246 
   255 
   247         @Override
   256         @Override @DefinedBy(Api.COMPILER_TREE)
   248         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   257         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   249             return v.visitDeprecated(this, d);
   258             return v.visitDeprecated(this, d);
   250         }
   259         }
   251 
   260 
   252         @Override
   261         @Override @DefinedBy(Api.COMPILER_TREE)
   253         public List<? extends DocTree> getBody() {
   262         public List<? extends DocTree> getBody() {
   254             return body;
   263             return body;
   255         }
   264         }
   256     }
   265     }
   257 
   266 
   258     public static class DCDocRoot extends DCInlineTag implements DocRootTree {
   267     public static class DCDocRoot extends DCInlineTag implements DocRootTree {
   259 
   268 
   260         @Override
   269         @Override @DefinedBy(Api.COMPILER_TREE)
   261         public Kind getKind() {
   270         public Kind getKind() {
   262             return Kind.DOC_ROOT;
   271             return Kind.DOC_ROOT;
   263         }
   272         }
   264 
   273 
   265         @Override
   274         @Override @DefinedBy(Api.COMPILER_TREE)
   266         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   275         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   267             return v.visitDocRoot(this, d);
   276             return v.visitDocRoot(this, d);
   268         }
   277         }
   269     }
   278     }
   270 
   279 
   273 
   282 
   274         DCEndElement(Name name) {
   283         DCEndElement(Name name) {
   275             this.name = name;
   284             this.name = name;
   276         }
   285         }
   277 
   286 
   278         @Override
   287         @Override @DefinedBy(Api.COMPILER_TREE)
   279         public Kind getKind() {
   288         public Kind getKind() {
   280             return Kind.END_ELEMENT;
   289             return Kind.END_ELEMENT;
   281         }
   290         }
   282 
   291 
   283         @Override
   292         @Override @DefinedBy(Api.COMPILER_TREE)
   284         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   293         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   285             return v.visitEndElement(this, d);
   294             return v.visitEndElement(this, d);
   286         }
   295         }
   287 
   296 
   288         @Override
   297         @Override @DefinedBy(Api.COMPILER_TREE)
   289         public Name getName() {
   298         public Name getName() {
   290             return name;
   299             return name;
   291         }
   300         }
   292     }
   301     }
   293 
   302 
   296 
   305 
   297         DCEntity(Name name) {
   306         DCEntity(Name name) {
   298             this.name = name;
   307             this.name = name;
   299         }
   308         }
   300 
   309 
   301         @Override
   310         @Override @DefinedBy(Api.COMPILER_TREE)
   302         public Kind getKind() {
   311         public Kind getKind() {
   303             return Kind.ENTITY;
   312             return Kind.ENTITY;
   304         }
   313         }
   305 
   314 
   306         @Override
   315         @Override @DefinedBy(Api.COMPILER_TREE)
   307         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   316         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   308             return v.visitEntity(this, d);
   317             return v.visitEntity(this, d);
   309         }
   318         }
   310 
   319 
   311         @Override
   320         @Override @DefinedBy(Api.COMPILER_TREE)
   312         public Name getName() {
   321         public Name getName() {
   313             return name;
   322             return name;
   314         }
   323         }
   315     }
   324     }
   316 
   325 
   321         DCErroneous(String body, JCDiagnostic.Factory diags, DiagnosticSource diagSource, String code, Object... args) {
   330         DCErroneous(String body, JCDiagnostic.Factory diags, DiagnosticSource diagSource, String code, Object... args) {
   322             this.body = body;
   331             this.body = body;
   323             this.diag = diags.error(diagSource, this, code, args);
   332             this.diag = diags.error(diagSource, this, code, args);
   324         }
   333         }
   325 
   334 
   326         @Override
   335         @Override @DefinedBy(Api.COMPILER_TREE)
   327         public Kind getKind() {
   336         public Kind getKind() {
   328             return Kind.ERRONEOUS;
   337             return Kind.ERRONEOUS;
   329         }
   338         }
   330 
   339 
   331         @Override
   340         @Override @DefinedBy(Api.COMPILER_TREE)
   332         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   341         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   333             return v.visitErroneous(this, d);
   342             return v.visitErroneous(this, d);
   334         }
   343         }
   335 
   344 
   336         @Override
   345         @Override @DefinedBy(Api.COMPILER_TREE)
   337         public String getBody() {
   346         public String getBody() {
   338             return body;
   347             return body;
   339         }
   348         }
   340 
   349 
   341         @Override
   350         @Override @DefinedBy(Api.COMPILER_TREE)
   342         public Diagnostic<JavaFileObject> getDiagnostic() {
   351         public Diagnostic<JavaFileObject> getDiagnostic() {
   343             return diag;
   352             return diag;
   344         }
   353         }
   345 
   354 
   346         @Override
   355         @Override
   370 
   379 
   371         DCIdentifier(Name name) {
   380         DCIdentifier(Name name) {
   372             this.name = name;
   381             this.name = name;
   373         }
   382         }
   374 
   383 
   375         @Override
   384         @Override @DefinedBy(Api.COMPILER_TREE)
   376         public Kind getKind() {
   385         public Kind getKind() {
   377             return Kind.IDENTIFIER;
   386             return Kind.IDENTIFIER;
   378         }
   387         }
   379 
   388 
   380         @Override
   389         @Override @DefinedBy(Api.COMPILER_TREE)
   381         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   390         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   382             return v.visitIdentifier(this, d);
   391             return v.visitIdentifier(this, d);
   383         }
   392         }
   384 
   393 
   385         @Override
   394         @Override @DefinedBy(Api.COMPILER_TREE)
   386         public Name getName() {
   395         public Name getName() {
   387             return name;
   396             return name;
   388         }
   397         }
   389     }
   398     }
   390 
   399 
   391     public static class DCInheritDoc extends DCInlineTag implements InheritDocTree {
   400     public static class DCInheritDoc extends DCInlineTag implements InheritDocTree {
   392         @Override
   401         @Override @DefinedBy(Api.COMPILER_TREE)
   393         public Kind getKind() {
   402         public Kind getKind() {
   394             return Kind.INHERIT_DOC;
   403             return Kind.INHERIT_DOC;
   395         }
   404         }
   396 
   405 
   397         @Override
   406         @Override @DefinedBy(Api.COMPILER_TREE)
   398         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   407         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   399             return v.visitInheritDoc(this, d);
   408             return v.visitInheritDoc(this, d);
   400         }
   409         }
   401     }
   410     }
   402 
   411 
   410             this.kind = kind;
   419             this.kind = kind;
   411             this.ref = ref;
   420             this.ref = ref;
   412             this.label = label;
   421             this.label = label;
   413         }
   422         }
   414 
   423 
   415         @Override
   424         @Override @DefinedBy(Api.COMPILER_TREE)
   416         public Kind getKind() {
   425         public Kind getKind() {
   417             return kind;
   426             return kind;
   418         }
   427         }
   419 
   428 
   420         @Override
   429         @Override @DefinedBy(Api.COMPILER_TREE)
   421         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   430         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   422             return v.visitLink(this, d);
   431             return v.visitLink(this, d);
   423         }
   432         }
   424 
   433 
   425         @Override
   434         @Override @DefinedBy(Api.COMPILER_TREE)
   426         public ReferenceTree getReference() {
   435         public ReferenceTree getReference() {
   427             return ref;
   436             return ref;
   428         }
   437         }
   429 
   438 
   430         @Override
   439         @Override @DefinedBy(Api.COMPILER_TREE)
   431         public List<? extends DocTree> getLabel() {
   440         public List<? extends DocTree> getLabel() {
   432             return label;
   441             return label;
   433         }
   442         }
   434     }
   443     }
   435 
   444 
   441             Assert.check(kind == Kind.CODE || kind == Kind.LITERAL);
   450             Assert.check(kind == Kind.CODE || kind == Kind.LITERAL);
   442             this.kind = kind;
   451             this.kind = kind;
   443             this.body = body;
   452             this.body = body;
   444         }
   453         }
   445 
   454 
   446         @Override
   455         @Override @DefinedBy(Api.COMPILER_TREE)
   447         public Kind getKind() {
   456         public Kind getKind() {
   448             return kind;
   457             return kind;
   449         }
   458         }
   450 
   459 
   451         @Override
   460         @Override @DefinedBy(Api.COMPILER_TREE)
   452         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   461         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   453             return v.visitLiteral(this, d);
   462             return v.visitLiteral(this, d);
   454         }
   463         }
   455 
   464 
   456         @Override
   465         @Override @DefinedBy(Api.COMPILER_TREE)
   457         public DCText getBody() {
   466         public DCText getBody() {
   458             return body;
   467             return body;
   459         }
   468         }
   460     }
   469     }
   461 
   470 
   468             this.isTypeParameter = isTypeParameter;
   477             this.isTypeParameter = isTypeParameter;
   469             this.name = name;
   478             this.name = name;
   470             this.description = description;
   479             this.description = description;
   471         }
   480         }
   472 
   481 
   473         @Override
   482         @Override @DefinedBy(Api.COMPILER_TREE)
   474         public Kind getKind() {
   483         public Kind getKind() {
   475             return Kind.PARAM;
   484             return Kind.PARAM;
   476         }
   485         }
   477 
   486 
   478         @Override
   487         @Override @DefinedBy(Api.COMPILER_TREE)
   479         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   488         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   480             return v.visitParam(this, d);
   489             return v.visitParam(this, d);
   481         }
   490         }
   482 
   491 
   483         @Override
   492         @Override @DefinedBy(Api.COMPILER_TREE)
   484         public boolean isTypeParameter() {
   493         public boolean isTypeParameter() {
   485             return isTypeParameter;
   494             return isTypeParameter;
   486         }
   495         }
   487 
   496 
   488         @Override
   497         @Override @DefinedBy(Api.COMPILER_TREE)
   489         public IdentifierTree getName() {
   498         public IdentifierTree getName() {
   490             return name;
   499             return name;
   491         }
   500         }
   492 
   501 
   493         @Override
   502         @Override @DefinedBy(Api.COMPILER_TREE)
   494         public List<? extends DocTree> getDescription() {
   503         public List<? extends DocTree> getDescription() {
   495             return description;
   504             return description;
   496         }
   505         }
   497     }
   506     }
   498 
   507 
   511             qualifierExpression = qualExpr;
   520             qualifierExpression = qualExpr;
   512             memberName = member;
   521             memberName = member;
   513             this.paramTypes = paramTypes;
   522             this.paramTypes = paramTypes;
   514         }
   523         }
   515 
   524 
   516         @Override
   525         @Override @DefinedBy(Api.COMPILER_TREE)
   517         public Kind getKind() {
   526         public Kind getKind() {
   518             return Kind.REFERENCE;
   527             return Kind.REFERENCE;
   519         }
   528         }
   520 
   529 
   521         @Override
   530         @Override @DefinedBy(Api.COMPILER_TREE)
   522         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   531         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   523             return v.visitReference(this, d);
   532             return v.visitReference(this, d);
   524         }
   533         }
   525 
   534 
   526         @Override
   535         @Override @DefinedBy(Api.COMPILER_TREE)
   527         public String getSignature() {
   536         public String getSignature() {
   528             return signature;
   537             return signature;
   529         }
   538         }
   530     }
   539     }
   531 
   540 
   534 
   543 
   535         DCReturn(List<DCTree> description) {
   544         DCReturn(List<DCTree> description) {
   536             this.description = description;
   545             this.description = description;
   537         }
   546         }
   538 
   547 
   539         @Override
   548         @Override @DefinedBy(Api.COMPILER_TREE)
   540         public Kind getKind() {
   549         public Kind getKind() {
   541             return Kind.RETURN;
   550             return Kind.RETURN;
   542         }
   551         }
   543 
   552 
   544         @Override
   553         @Override @DefinedBy(Api.COMPILER_TREE)
   545         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   554         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   546             return v.visitReturn(this, d);
   555             return v.visitReturn(this, d);
   547         }
   556         }
   548 
   557 
   549         @Override
   558         @Override @DefinedBy(Api.COMPILER_TREE)
   550         public List<? extends DocTree> getDescription() {
   559         public List<? extends DocTree> getDescription() {
   551             return description;
   560             return description;
   552         }
   561         }
   553     }
   562     }
   554 
   563 
   557 
   566 
   558         DCSee(List<DCTree> reference) {
   567         DCSee(List<DCTree> reference) {
   559             this.reference = reference;
   568             this.reference = reference;
   560         }
   569         }
   561 
   570 
   562         @Override
   571         @Override @DefinedBy(Api.COMPILER_TREE)
   563         public Kind getKind() {
   572         public Kind getKind() {
   564             return Kind.SEE;
   573             return Kind.SEE;
   565         }
   574         }
   566 
   575 
   567         @Override
   576         @Override @DefinedBy(Api.COMPILER_TREE)
   568         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   577         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   569             return v.visitSee(this, d);
   578             return v.visitSee(this, d);
   570         }
   579         }
   571 
   580 
   572         @Override
   581         @Override @DefinedBy(Api.COMPILER_TREE)
   573         public List<? extends DocTree> getReference() {
   582         public List<? extends DocTree> getReference() {
   574             return reference;
   583             return reference;
   575         }
   584         }
   576     }
   585     }
   577 
   586 
   580 
   589 
   581         DCSerial(List<DCTree> description) {
   590         DCSerial(List<DCTree> description) {
   582             this.description = description;
   591             this.description = description;
   583         }
   592         }
   584 
   593 
   585         @Override
   594         @Override @DefinedBy(Api.COMPILER_TREE)
   586         public Kind getKind() {
   595         public Kind getKind() {
   587             return Kind.SERIAL;
   596             return Kind.SERIAL;
   588         }
   597         }
   589 
   598 
   590         @Override
   599         @Override @DefinedBy(Api.COMPILER_TREE)
   591         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   600         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   592             return v.visitSerial(this, d);
   601             return v.visitSerial(this, d);
   593         }
   602         }
   594 
   603 
   595         @Override
   604         @Override @DefinedBy(Api.COMPILER_TREE)
   596         public List<? extends DocTree> getDescription() {
   605         public List<? extends DocTree> getDescription() {
   597             return description;
   606             return description;
   598         }
   607         }
   599     }
   608     }
   600 
   609 
   603 
   612 
   604         DCSerialData(List<DCTree> description) {
   613         DCSerialData(List<DCTree> description) {
   605             this.description = description;
   614             this.description = description;
   606         }
   615         }
   607 
   616 
   608         @Override
   617         @Override @DefinedBy(Api.COMPILER_TREE)
   609         public Kind getKind() {
   618         public Kind getKind() {
   610             return Kind.SERIAL_DATA;
   619             return Kind.SERIAL_DATA;
   611         }
   620         }
   612 
   621 
   613         @Override
   622         @Override @DefinedBy(Api.COMPILER_TREE)
   614         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   623         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   615             return v.visitSerialData(this, d);
   624             return v.visitSerialData(this, d);
   616         }
   625         }
   617 
   626 
   618         @Override
   627         @Override @DefinedBy(Api.COMPILER_TREE)
   619         public List<? extends DocTree> getDescription() {
   628         public List<? extends DocTree> getDescription() {
   620             return description;
   629             return description;
   621         }
   630         }
   622     }
   631     }
   623 
   632 
   630             this.description = description;
   639             this.description = description;
   631             this.name = name;
   640             this.name = name;
   632             this.type = type;
   641             this.type = type;
   633         }
   642         }
   634 
   643 
   635         @Override
   644         @Override @DefinedBy(Api.COMPILER_TREE)
   636         public Kind getKind() {
   645         public Kind getKind() {
   637             return Kind.SERIAL_FIELD;
   646             return Kind.SERIAL_FIELD;
   638         }
   647         }
   639 
   648 
   640         @Override
   649         @Override @DefinedBy(Api.COMPILER_TREE)
   641         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   650         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   642             return v.visitSerialField(this, d);
   651             return v.visitSerialField(this, d);
   643         }
   652         }
   644 
   653 
   645         @Override
   654         @Override @DefinedBy(Api.COMPILER_TREE)
   646         public List<? extends DocTree> getDescription() {
   655         public List<? extends DocTree> getDescription() {
   647             return description;
   656             return description;
   648         }
   657         }
   649 
   658 
   650         @Override
   659         @Override @DefinedBy(Api.COMPILER_TREE)
   651         public IdentifierTree getName() {
   660         public IdentifierTree getName() {
   652             return name;
   661             return name;
   653         }
   662         }
   654 
   663 
   655         @Override
   664         @Override @DefinedBy(Api.COMPILER_TREE)
   656         public ReferenceTree getType() {
   665         public ReferenceTree getType() {
   657             return type;
   666             return type;
   658         }
   667         }
   659     }
   668     }
   660 
   669 
   663 
   672 
   664         DCSince(List<DCTree> body) {
   673         DCSince(List<DCTree> body) {
   665             this.body = body;
   674             this.body = body;
   666         }
   675         }
   667 
   676 
   668         @Override
   677         @Override @DefinedBy(Api.COMPILER_TREE)
   669         public Kind getKind() {
   678         public Kind getKind() {
   670             return Kind.SINCE;
   679             return Kind.SINCE;
   671         }
   680         }
   672 
   681 
   673         @Override
   682         @Override @DefinedBy(Api.COMPILER_TREE)
   674         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   683         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   675             return v.visitSince(this, d);
   684             return v.visitSince(this, d);
   676         }
   685         }
   677 
   686 
   678         @Override
   687         @Override @DefinedBy(Api.COMPILER_TREE)
   679         public List<? extends DocTree> getBody() {
   688         public List<? extends DocTree> getBody() {
   680             return body;
   689             return body;
   681         }
   690         }
   682     }
   691     }
   683 
   692 
   690             this.name = name;
   699             this.name = name;
   691             this.attrs = attrs;
   700             this.attrs = attrs;
   692             this.selfClosing = selfClosing;
   701             this.selfClosing = selfClosing;
   693         }
   702         }
   694 
   703 
   695         @Override
   704         @Override @DefinedBy(Api.COMPILER_TREE)
   696         public Kind getKind() {
   705         public Kind getKind() {
   697             return Kind.START_ELEMENT;
   706             return Kind.START_ELEMENT;
   698         }
   707         }
   699 
   708 
   700         @Override
   709         @Override @DefinedBy(Api.COMPILER_TREE)
   701         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   710         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   702             return v.visitStartElement(this, d);
   711             return v.visitStartElement(this, d);
   703         }
   712         }
   704 
   713 
   705         @Override
   714         @Override @DefinedBy(Api.COMPILER_TREE)
   706         public Name getName() {
   715         public Name getName() {
   707             return name;
   716             return name;
   708         }
   717         }
   709 
   718 
   710         @Override
   719         @Override @DefinedBy(Api.COMPILER_TREE)
   711         public List<? extends DocTree> getAttributes() {
   720         public List<? extends DocTree> getAttributes() {
   712             return attrs;
   721             return attrs;
   713         }
   722         }
   714 
   723 
   715         @Override
   724         @Override @DefinedBy(Api.COMPILER_TREE)
   716         public boolean isSelfClosing() {
   725         public boolean isSelfClosing() {
   717             return selfClosing;
   726             return selfClosing;
   718         }
   727         }
   719     }
   728     }
   720 
   729 
   723 
   732 
   724         DCText(String text) {
   733         DCText(String text) {
   725             this.text = text;
   734             this.text = text;
   726         }
   735         }
   727 
   736 
   728         @Override
   737         @Override @DefinedBy(Api.COMPILER_TREE)
   729         public Kind getKind() {
   738         public Kind getKind() {
   730             return Kind.TEXT;
   739             return Kind.TEXT;
   731         }
   740         }
   732 
   741 
   733         @Override
   742         @Override @DefinedBy(Api.COMPILER_TREE)
   734         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   743         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   735             return v.visitText(this, d);
   744             return v.visitText(this, d);
   736         }
   745         }
   737 
   746 
   738         @Override
   747         @Override @DefinedBy(Api.COMPILER_TREE)
   739         public String getBody() {
   748         public String getBody() {
   740             return text;
   749             return text;
   741         }
   750         }
   742     }
   751     }
   743 
   752 
   751             this.kind = kind;
   760             this.kind = kind;
   752             this.name = name;
   761             this.name = name;
   753             this.description = description;
   762             this.description = description;
   754         }
   763         }
   755 
   764 
   756         @Override
   765         @Override @DefinedBy(Api.COMPILER_TREE)
   757         public Kind getKind() {
   766         public Kind getKind() {
   758             return kind;
   767             return kind;
   759         }
   768         }
   760 
   769 
   761         @Override
   770         @Override @DefinedBy(Api.COMPILER_TREE)
   762         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   771         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   763             return v.visitThrows(this, d);
   772             return v.visitThrows(this, d);
   764         }
   773         }
   765 
   774 
   766         @Override
   775         @Override @DefinedBy(Api.COMPILER_TREE)
   767         public ReferenceTree getExceptionName() {
   776         public ReferenceTree getExceptionName() {
   768             return name;
   777             return name;
   769         }
   778         }
   770 
   779 
   771         @Override
   780         @Override @DefinedBy(Api.COMPILER_TREE)
   772         public List<? extends DocTree> getDescription() {
   781         public List<? extends DocTree> getDescription() {
   773             return description;
   782             return description;
   774         }
   783         }
   775     }
   784     }
   776 
   785 
   781         DCUnknownBlockTag(Name name, List<DCTree> content) {
   790         DCUnknownBlockTag(Name name, List<DCTree> content) {
   782             this.name = name;
   791             this.name = name;
   783             this.content = content;
   792             this.content = content;
   784         }
   793         }
   785 
   794 
   786         @Override
   795         @Override @DefinedBy(Api.COMPILER_TREE)
   787         public Kind getKind() {
   796         public Kind getKind() {
   788             return Kind.UNKNOWN_BLOCK_TAG;
   797             return Kind.UNKNOWN_BLOCK_TAG;
   789         }
   798         }
   790 
   799 
   791         @Override
   800         @Override @DefinedBy(Api.COMPILER_TREE)
   792         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   801         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   793             return v.visitUnknownBlockTag(this, d);
   802             return v.visitUnknownBlockTag(this, d);
   794         }
   803         }
   795 
   804 
   796         @Override
   805         @Override @DefinedBy(Api.COMPILER_TREE)
   797         public String getTagName() {
   806         public String getTagName() {
   798             return name.toString();
   807             return name.toString();
   799         }
   808         }
   800 
   809 
   801         @Override
   810         @Override @DefinedBy(Api.COMPILER_TREE)
   802         public List<? extends DocTree> getContent() {
   811         public List<? extends DocTree> getContent() {
   803             return content;
   812             return content;
   804         }
   813         }
   805     }
   814     }
   806 
   815 
   811         DCUnknownInlineTag(Name name, List<DCTree> content) {
   820         DCUnknownInlineTag(Name name, List<DCTree> content) {
   812             this.name = name;
   821             this.name = name;
   813             this.content = content;
   822             this.content = content;
   814         }
   823         }
   815 
   824 
   816         @Override
   825         @Override @DefinedBy(Api.COMPILER_TREE)
   817         public Kind getKind() {
   826         public Kind getKind() {
   818             return Kind.UNKNOWN_INLINE_TAG;
   827             return Kind.UNKNOWN_INLINE_TAG;
   819         }
   828         }
   820 
   829 
   821         @Override
   830         @Override @DefinedBy(Api.COMPILER_TREE)
   822         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   831         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   823             return v.visitUnknownInlineTag(this, d);
   832             return v.visitUnknownInlineTag(this, d);
   824         }
   833         }
   825 
   834 
   826         @Override
   835         @Override @DefinedBy(Api.COMPILER_TREE)
   827         public String getTagName() {
   836         public String getTagName() {
   828             return name.toString();
   837             return name.toString();
   829         }
   838         }
   830 
   839 
   831         @Override
   840         @Override @DefinedBy(Api.COMPILER_TREE)
   832         public List<? extends DocTree> getContent() {
   841         public List<? extends DocTree> getContent() {
   833             return content;
   842             return content;
   834         }
   843         }
   835     }
   844     }
   836 
   845 
   839 
   848 
   840         DCValue(DCReference ref) {
   849         DCValue(DCReference ref) {
   841             this.ref = ref;
   850             this.ref = ref;
   842         }
   851         }
   843 
   852 
   844         @Override
   853         @Override @DefinedBy(Api.COMPILER_TREE)
   845         public Kind getKind() {
   854         public Kind getKind() {
   846             return Kind.VALUE;
   855             return Kind.VALUE;
   847         }
   856         }
   848 
   857 
   849         @Override
   858         @Override @DefinedBy(Api.COMPILER_TREE)
   850         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   859         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   851             return v.visitValue(this, d);
   860             return v.visitValue(this, d);
   852         }
   861         }
   853 
   862 
   854         @Override
   863         @Override @DefinedBy(Api.COMPILER_TREE)
   855         public ReferenceTree getReference() {
   864         public ReferenceTree getReference() {
   856             return ref;
   865             return ref;
   857         }
   866         }
   858     }
   867     }
   859 
   868 
   862 
   871 
   863         DCVersion(List<DCTree> body) {
   872         DCVersion(List<DCTree> body) {
   864             this.body = body;
   873             this.body = body;
   865         }
   874         }
   866 
   875 
   867         @Override
   876         @Override @DefinedBy(Api.COMPILER_TREE)
   868         public Kind getKind() {
   877         public Kind getKind() {
   869             return Kind.VERSION;
   878             return Kind.VERSION;
   870         }
   879         }
   871 
   880 
   872         @Override
   881         @Override @DefinedBy(Api.COMPILER_TREE)
   873         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   882         public <R, D> R accept(DocTreeVisitor<R, D> v, D d) {
   874             return v.visitVersion(this, d);
   883             return v.visitVersion(this, d);
   875         }
   884         }
   876 
   885 
   877         @Override
   886         @Override @DefinedBy(Api.COMPILER_TREE)
   878         public List<? extends DocTree> getBody() {
   887         public List<? extends DocTree> getBody() {
   879             return body;
   888             return body;
   880         }
   889         }
   881     }
   890     }
   882 
   891