|
76 | 76 | import com.sun.tools.javac.tree.DCTree.DCSerialField;
|
77 | 77 | import com.sun.tools.javac.tree.DCTree.DCSince;
|
78 | 78 | import com.sun.tools.javac.tree.DCTree.DCSnippet;
|
| 79 | +import com.sun.tools.javac.tree.DCTree.DCSpec; |
79 | 80 | import com.sun.tools.javac.tree.DCTree.DCStartElement;
|
80 | 81 | import com.sun.tools.javac.tree.DCTree.DCSummary;
|
81 | 82 | import com.sun.tools.javac.tree.DCTree.DCSystemProperty;
|
|
89 | 90 | import com.sun.tools.javac.util.Context;
|
90 | 91 | import com.sun.tools.javac.util.DefinedBy;
|
91 | 92 | import com.sun.tools.javac.util.DefinedBy.Api;
|
92 |
| -import com.sun.tools.javac.util.DiagnosticSource; |
93 | 93 | import com.sun.tools.javac.util.JCDiagnostic;
|
94 |
| -import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; |
95 | 94 | import com.sun.tools.javac.util.ListBuffer;
|
96 | 95 | import com.sun.tools.javac.util.Pair;
|
97 | 96 | import com.sun.tools.javac.util.Position;
|
@@ -124,7 +123,7 @@ public static DocTreeMaker instance(Context context) {
|
124 | 123 |
|
125 | 124 | /** The position at which subsequent trees will be created.
|
126 | 125 | */
|
127 |
| - public int pos = Position.NOPOS; |
| 126 | + public int pos; |
128 | 127 |
|
129 | 128 | private final JavacTrees trees;
|
130 | 129 |
|
@@ -238,9 +237,8 @@ public boolean isDeprecated() {
|
238 | 237 | }
|
239 | 238 | };
|
240 | 239 | Pair<List<DCTree>, List<DCTree>> pair = splitBody(fullBody);
|
241 |
| - DCDocComment tree = new DCDocComment(c, fBody, pair.fst, pair.snd, cast(tags), |
| 240 | + return new DCDocComment(c, fBody, pair.fst, pair.snd, cast(tags), |
242 | 241 | cast(preamble), cast(postamble));
|
243 |
| - return tree; |
244 | 242 | }
|
245 | 243 |
|
246 | 244 | @Override @DefinedBy(Api.COMPILER_TREE)
|
@@ -421,6 +419,13 @@ public DCSnippet newSnippetTree(List<? extends DocTree> attributes, TextTree tex
|
421 | 419 | return tree;
|
422 | 420 | }
|
423 | 421 |
|
| 422 | + @Override @DefinedBy(Api.COMPILER_TREE) |
| 423 | + public DCSpec newSpecTree(TextTree url, List<? extends DocTree> title) { |
| 424 | + DCSpec tree = new DCSpec((DCText) url, cast(title)); |
| 425 | + tree.pos = pos; |
| 426 | + return tree; |
| 427 | + } |
| 428 | + |
424 | 429 | @Override @DefinedBy(Api.COMPILER_TREE)
|
425 | 430 | public DCStartElement newStartElementTree(Name name, List<? extends DocTree> attrs, boolean selfClosing) {
|
426 | 431 | DCStartElement tree = new DCStartElement(name, cast(attrs), selfClosing);
|
|
0 commit comments