jjg@1409: /* jjg@1409: * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. jjg@1409: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@1409: * jjg@1409: * This code is free software; you can redistribute it and/or modify it jjg@1409: * under the terms of the GNU General Public License version 2 only, as jjg@1409: * published by the Free Software Foundation. jjg@1409: * jjg@1409: * This code is distributed in the hope that it will be useful, but WITHOUT jjg@1409: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@1409: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@1409: * version 2 for more details (a copy is included in the LICENSE file that jjg@1409: * accompanied this code). jjg@1409: * jjg@1409: * You should have received a copy of the GNU General Public License version jjg@1409: * 2 along with this work; if not, write to the Free Software Foundation, jjg@1409: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@1409: * jjg@1409: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jjg@1409: * or visit www.oracle.com if you need additional information or have any jjg@1409: * questions. jjg@1409: */ jjg@1409: jjg@1409: /* jjg@1409: * @test jjg@1409: * @bug 7021614 jjg@1409: * @summary extend com.sun.source API to support parsing javadoc comments jjg@1409: * @build DocCommentTester jjg@1409: * @run main DocCommentTester SeeTest.java jjg@1409: */ jjg@1409: jjg@1409: class SeeTest { jjg@1409: /** jjg@1409: * abc. jjg@1409: * @see "String" jjg@1409: */ jjg@1409: void quoted_text() { } jjg@1409: /* jjg@1409: DocComment[DOC_COMMENT, pos:1 jjg@1409: firstSentence: 1 jjg@1409: Text[TEXT, pos:1, abc.] jjg@1409: body: empty jjg@1409: block tags: 1 jjg@1409: Erroneous[ERRONEOUS, pos:7 jjg@1409: code: compiler.err.dc.unexpected.content jjg@1409: body: @see_"String" jjg@1409: ] jjg@1409: ] jjg@1409: */ jjg@1409: jjg@1409: /** jjg@1409: * abc. jjg@1409: * @see url jjg@1409: */ jjg@1409: void url() { } jjg@1409: /* jjg@1409: DocComment[DOC_COMMENT, pos:1 jjg@1409: firstSentence: 1 jjg@1409: Text[TEXT, pos:1, abc.] jjg@1409: body: empty jjg@1409: block tags: 1 jjg@1409: See[SEE, pos:7 jjg@1409: reference: 3 jjg@1409: StartElement[START_ELEMENT, pos:12 jjg@1409: name:a jjg@1409: attributes: 1 jjg@1409: Attribute[ATTRIBUTE, pos:15 jjg@1409: name: href jjg@1409: vkind: DOUBLE jjg@1409: value: 1 jjg@1409: Text[TEXT, pos:21, url] jjg@1409: ] jjg@1409: ] jjg@1409: Text[TEXT, pos:26, url] jjg@1409: EndElement[END_ELEMENT, pos:29, a] jjg@1409: ] jjg@1409: ] jjg@1409: */ jjg@1409: jjg@1409: /** jjg@1409: * abc. jjg@1409: * @see String text jjg@1409: */ jjg@1409: void string() { } jjg@1409: /* jjg@1409: DocComment[DOC_COMMENT, pos:1 jjg@1409: firstSentence: 1 jjg@1409: Text[TEXT, pos:1, abc.] jjg@1409: body: empty jjg@1409: block tags: 1 jjg@1409: See[SEE, pos:7 jjg@1409: reference: 2 jjg@1409: Reference[REFERENCE, pos:12, String] jjg@1409: Text[TEXT, pos:19, text] jjg@1409: ] jjg@1409: ] jjg@1409: */ jjg@1409: jjg@1409: /** jjg@1409: * abc. jjg@1409: * @see java.lang.String text jjg@1409: */ jjg@1409: void j_l_string() { } jjg@1409: /* jjg@1409: DocComment[DOC_COMMENT, pos:1 jjg@1409: firstSentence: 1 jjg@1409: Text[TEXT, pos:1, abc.] jjg@1409: body: empty jjg@1409: block tags: 1 jjg@1409: See[SEE, pos:7 jjg@1409: reference: 2 jjg@1409: Reference[REFERENCE, pos:12, java.lang.String] jjg@1409: Text[TEXT, pos:29, text] jjg@1409: ] jjg@1409: ] jjg@1409: */ jjg@1409: jjg@1409: /** jjg@1409: * abc. jjg@1409: * @see java.lang.String#length text jjg@1409: */ jjg@1409: void j_l_string_length() { } jjg@1409: /* jjg@1409: DocComment[DOC_COMMENT, pos:1 jjg@1409: firstSentence: 1 jjg@1409: Text[TEXT, pos:1, abc.] jjg@1409: body: empty jjg@1409: block tags: 1 jjg@1409: See[SEE, pos:7 jjg@1409: reference: 2 jjg@1409: Reference[REFERENCE, pos:12, java.lang.String#length] jjg@1409: Text[TEXT, pos:36, text] jjg@1409: ] jjg@1409: ] jjg@1409: */ jjg@1409: jjg@1409: /** jjg@1409: * abc. jjg@1409: * @see java.lang.String#matches(String regex) text jjg@1409: */ jjg@1409: void j_l_string_matches() { } jjg@1409: /* jjg@1409: DocComment[DOC_COMMENT, pos:1 jjg@1409: firstSentence: 1 jjg@1409: Text[TEXT, pos:1, abc.] jjg@1409: body: empty jjg@1409: block tags: 1 jjg@1409: See[SEE, pos:7 jjg@1409: reference: 2 jjg@1409: Reference[REFERENCE, pos:12, java.lang.String...#matches(String_regex)] jjg@1409: Text[TEXT, pos:51, text] jjg@1409: ] jjg@1409: ] jjg@1409: */ jjg@1409: jjg@1409: /** jjg@1409: * abc. jjg@1409: * @see 123 text jjg@1409: */ jjg@1409: void bad_numeric() { } jjg@1409: /* jjg@1409: DocComment[DOC_COMMENT, pos:1 jjg@1409: firstSentence: 1 jjg@1409: Text[TEXT, pos:1, abc.] jjg@1409: body: empty jjg@1409: block tags: 1 jjg@1409: Erroneous[ERRONEOUS, pos:7 jjg@1409: code: compiler.err.dc.unexpected.content jjg@1409: body: @see_123_text jjg@1409: ] jjg@1409: ] jjg@1409: */ jjg@1409: jjg@1409: }