Fri, 24 Apr 2020 03:58:51 +0100
Merge
1 /*
2 * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
24 /*
25 * @test
26 * @bug 7021614 8031212
27 * @summary extend com.sun.source API to support parsing javadoc comments
28 * @build DocCommentTester
29 * @run main DocCommentTester SeeTest.java
30 */
32 class SeeTest {
33 /**
34 * abc.
35 * @see "String"
36 */
37 void quoted_text() { }
38 /*
39 DocComment[DOC_COMMENT, pos:1
40 firstSentence: 1
41 Text[TEXT, pos:1, abc.]
42 body: empty
43 block tags: 1
44 See[SEE, pos:7
45 reference: 1
46 Text[TEXT, pos:12, "String"]
47 ]
48 ]
49 */
51 /**
52 * abc.
53 * @see <a href="url">url</a>
54 */
55 void url() { }
56 /*
57 DocComment[DOC_COMMENT, pos:1
58 firstSentence: 1
59 Text[TEXT, pos:1, abc.]
60 body: empty
61 block tags: 1
62 See[SEE, pos:7
63 reference: 3
64 StartElement[START_ELEMENT, pos:12
65 name:a
66 attributes: 1
67 Attribute[ATTRIBUTE, pos:15
68 name: href
69 vkind: DOUBLE
70 value: 1
71 Text[TEXT, pos:21, url]
72 ]
73 ]
74 Text[TEXT, pos:26, url]
75 EndElement[END_ELEMENT, pos:29, a]
76 ]
77 ]
78 */
80 /**
81 * abc.
82 * @see String text
83 */
84 void string() { }
85 /*
86 DocComment[DOC_COMMENT, pos:1
87 firstSentence: 1
88 Text[TEXT, pos:1, abc.]
89 body: empty
90 block tags: 1
91 See[SEE, pos:7
92 reference: 2
93 Reference[REFERENCE, pos:12, String]
94 Text[TEXT, pos:19, text]
95 ]
96 ]
97 */
99 /**
100 * abc.
101 * @see java.lang.String text
102 */
103 void j_l_string() { }
104 /*
105 DocComment[DOC_COMMENT, pos:1
106 firstSentence: 1
107 Text[TEXT, pos:1, abc.]
108 body: empty
109 block tags: 1
110 See[SEE, pos:7
111 reference: 2
112 Reference[REFERENCE, pos:12, java.lang.String]
113 Text[TEXT, pos:29, text]
114 ]
115 ]
116 */
118 /**
119 * abc.
120 * @see java.lang.String#length text
121 */
122 void j_l_string_length() { }
123 /*
124 DocComment[DOC_COMMENT, pos:1
125 firstSentence: 1
126 Text[TEXT, pos:1, abc.]
127 body: empty
128 block tags: 1
129 See[SEE, pos:7
130 reference: 2
131 Reference[REFERENCE, pos:12, java.lang.String#length]
132 Text[TEXT, pos:36, text]
133 ]
134 ]
135 */
137 /**
138 * abc.
139 * @see java.lang.String#matches(String regex) text
140 */
141 void j_l_string_matches() { }
142 /*
143 DocComment[DOC_COMMENT, pos:1
144 firstSentence: 1
145 Text[TEXT, pos:1, abc.]
146 body: empty
147 block tags: 1
148 See[SEE, pos:7
149 reference: 2
150 Reference[REFERENCE, pos:12, java.lang.String...#matches(String_regex)]
151 Text[TEXT, pos:51, text]
152 ]
153 ]
154 */
156 /**
157 * abc.
158 * @see 123 text
159 */
160 void bad_numeric() { }
161 /*
162 DocComment[DOC_COMMENT, pos:1
163 firstSentence: 1
164 Text[TEXT, pos:1, abc.]
165 body: empty
166 block tags: 1
167 Erroneous[ERRONEOUS, pos:7
168 code: compiler.err.dc.unexpected.content
169 body: @see_123_text
170 ]
171 ]
172 */
174 }