Merge
This commit is contained in:
commit
243b526b99
@ -216,12 +216,15 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
pre.addContent(modifiers);
|
||||
LinkInfoImpl linkInfo = new LinkInfoImpl(
|
||||
LinkInfoImpl.CONTEXT_CLASS_SIGNATURE, annotationType, false);
|
||||
Content name = new RawHtml (annotationType.name() +
|
||||
getTypeParameterLinks(linkInfo));
|
||||
Content annotationName = new StringContent(annotationType.name());
|
||||
Content parameterLinks = new RawHtml(getTypeParameterLinks(linkInfo));
|
||||
if (configuration().linksource) {
|
||||
addSrcLink(annotationType, name, pre);
|
||||
addSrcLink(annotationType, annotationName, pre);
|
||||
pre.addContent(parameterLinks);
|
||||
} else {
|
||||
pre.addContent(HtmlTree.STRONG(name));
|
||||
Content span = HtmlTree.SPAN(HtmlStyle.strong, annotationName);
|
||||
span.addContent(parameterLinks);
|
||||
pre.addContent(span);
|
||||
}
|
||||
annotationInfoTree.addContent(pre);
|
||||
}
|
||||
|
@ -228,12 +228,15 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
LinkInfoImpl.CONTEXT_CLASS_SIGNATURE, classDoc, false);
|
||||
//Let's not link to ourselves in the signature.
|
||||
linkInfo.linkToSelf = false;
|
||||
Content name = new RawHtml (classDoc.name() +
|
||||
getTypeParameterLinks(linkInfo));
|
||||
Content className = new StringContent(classDoc.name());
|
||||
Content parameterLinks = new RawHtml(getTypeParameterLinks(linkInfo));
|
||||
if (configuration().linksource) {
|
||||
addSrcLink(classDoc, name, pre);
|
||||
addSrcLink(classDoc, className, pre);
|
||||
pre.addContent(parameterLinks);
|
||||
} else {
|
||||
pre.addContent(HtmlTree.STRONG(name));
|
||||
Content span = HtmlTree.SPAN(HtmlStyle.strong, className);
|
||||
span.addContent(parameterLinks);
|
||||
pre.addContent(span);
|
||||
}
|
||||
if (!isInterface) {
|
||||
Type superclass = Util.getFirstVisibleSuperClass(classDoc,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -69,9 +69,6 @@ public class LinkFactoryImpl extends LinkFactory {
|
||||
StringBuffer label = new StringBuffer(
|
||||
classLinkInfo.getClassLinkLabel(m_writer.configuration));
|
||||
classLinkInfo.displayLength += label.length();
|
||||
if (noLabel && classLinkInfo.excludeTypeParameterLinks) {
|
||||
label.append(getTypeParameterLinks(linkInfo).toString());
|
||||
}
|
||||
Configuration configuration = ConfigurationImpl.getInstance();
|
||||
LinkOutputImpl linkOutput = new LinkOutputImpl();
|
||||
if (classDoc.isIncluded()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -408,10 +408,6 @@ public class LinkInfoImpl extends LinkInfo {
|
||||
|
||||
case CONTEXT_PACKAGE:
|
||||
case CONTEXT_CLASS_USE:
|
||||
excludeTypeBoundsLinks = true;
|
||||
excludeTypeParameterLinks = true;
|
||||
break;
|
||||
|
||||
case CONTEXT_CLASS_HEADER:
|
||||
case CONTEXT_CLASS_SIGNATURE:
|
||||
excludeTypeParameterLinks = true;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,8 +27,7 @@
|
||||
* @summary <DESC>
|
||||
* @author jamieh
|
||||
* @library ../lib/
|
||||
* @build JavadocTester
|
||||
* @build TestDeprecatedDocs
|
||||
* @build JavadocTester TestDeprecatedDocs
|
||||
* @run main TestDeprecatedDocs
|
||||
*/
|
||||
|
||||
@ -77,7 +76,7 @@ public class TestDeprecatedDocs extends JavadocTester {
|
||||
{TARGET_FILE, "pkg.DeprecatedClassByAnnotation.field"},
|
||||
|
||||
{TARGET_FILE2, "<pre>@Deprecated" + NL +
|
||||
"public class <strong>DeprecatedClassByAnnotation</strong>" + NL +
|
||||
"public class <span class=\"strong\">DeprecatedClassByAnnotation</span>" + NL +
|
||||
"extends java.lang.Object</pre>"},
|
||||
|
||||
{TARGET_FILE2, "<pre>@Deprecated" + NL +
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,8 +27,7 @@
|
||||
* @summary Verify that spaces do not appear in hrefs and anchors.
|
||||
* @author jamieh
|
||||
* @library ../lib/
|
||||
* @build JavadocTester
|
||||
* @build TestHref
|
||||
* @build JavadocTester TestHref
|
||||
* @run main TestHref
|
||||
*/
|
||||
|
||||
@ -81,7 +80,7 @@ public class TestHref extends JavadocTester {
|
||||
|
||||
//Signature does not link to the page itself.
|
||||
{BUG_ID + FS + "pkg" + FS + "C4.html",
|
||||
"public abstract class <strong>C4<E extends C4<E>></strong>"
|
||||
"public abstract class <span class=\"strong\">C4<E extends C4<E>></span>"
|
||||
},
|
||||
};
|
||||
private static final String[][] NEGATED_TEST =
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,8 +29,7 @@
|
||||
* @summary This test verifies the nesting of definition list tags.
|
||||
* @author Bhavesh Patel
|
||||
* @library ../lib/
|
||||
* @build JavadocTester
|
||||
* @build TestHtmlDefinitionListTag
|
||||
* @build JavadocTester TestHtmlDefinitionListTag
|
||||
* @run main TestHtmlDefinitionListTag
|
||||
*/
|
||||
|
||||
@ -43,7 +42,8 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
|
||||
// Optional Element should print properly nested definition list tags
|
||||
// for default value.
|
||||
private static final String[][] TEST_ALL = {
|
||||
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<pre>public class <strong>C1</strong>" + NL +
|
||||
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<pre>public class " +
|
||||
"<span class=\"strong\">C1</span>" + NL +
|
||||
"extends java.lang.Object" + NL + "implements java.io.Serializable</pre>"},
|
||||
{BUG_ID + FS + "pkg1" + FS + "C4.html", "<dl>" + NL +
|
||||
"<dt>Default:</dt>" + NL + "<dd>true</dd>" + NL +
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -28,8 +28,7 @@
|
||||
* right files.
|
||||
* @author jamieh
|
||||
* @library ../lib/
|
||||
* @build JavadocTester
|
||||
* @build TestLinkOption
|
||||
* @build JavadocTester TestLinkOption
|
||||
* @run main TestLinkOption
|
||||
*/
|
||||
|
||||
@ -62,7 +61,7 @@ public class TestLinkOption extends JavadocTester {
|
||||
"Object</a> p3)"
|
||||
},
|
||||
{BUG_ID + "-1" + FS + "java" + FS + "lang" + FS + "StringBuilderChild.html",
|
||||
"<pre>public abstract class <strong>StringBuilderChild</strong>" + NL +
|
||||
"<pre>public abstract class <span class=\"strong\">StringBuilderChild</span>" + NL +
|
||||
"extends <a href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true\" " +
|
||||
"title=\"class or interface in java.lang\">Object</a></pre>"
|
||||
},
|
||||
|
@ -23,14 +23,13 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 4789689 4905985 4927164 4827184 4993906 5004549 7025314
|
||||
* @bug 4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344
|
||||
* @summary Run Javadoc on a set of source files that demonstrate new
|
||||
* language features. Check the output to ensure that the new
|
||||
* language features are properly documented.
|
||||
* @author jamieh
|
||||
* @library ../lib/
|
||||
* @build JavadocTester
|
||||
* @build TestNewLanguageFeatures
|
||||
* @build JavadocTester TestNewLanguageFeatures
|
||||
* @run main TestNewLanguageFeatures
|
||||
*/
|
||||
|
||||
@ -53,7 +52,8 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
//Make sure enum header is correct.
|
||||
{BUG_ID + FS + "pkg" + FS + "Coin.html", "Enum Coin</h2>"},
|
||||
//Make sure enum signature is correct.
|
||||
{BUG_ID + FS + "pkg" + FS + "Coin.html", "<pre>public enum <strong>Coin</strong>" + NL +
|
||||
{BUG_ID + FS + "pkg" + FS + "Coin.html", "<pre>public enum " +
|
||||
"<span class=\"strong\">Coin</span>" + NL +
|
||||
"extends java.lang.Enum<<a href=\"../pkg/Coin.html\" " +
|
||||
"title=\"enum in pkg\">Coin</a>></pre>"
|
||||
},
|
||||
@ -118,8 +118,8 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
|
||||
//Signature of subclass that has type parameters.
|
||||
{BUG_ID + FS + "pkg" + FS + "TypeParameterSubClass.html",
|
||||
"<pre>public class <strong>TypeParameterSubClass<T extends " +
|
||||
"java.lang.String></strong>" + NL + "extends " +
|
||||
"<pre>public class <span class=\"strong\">TypeParameterSubClass<T extends " +
|
||||
"java.lang.String></span>" + NL + "extends " +
|
||||
"<a href=\"../pkg/TypeParameterSuperClass.html\" title=\"class in pkg\">" +
|
||||
"TypeParameterSuperClass</a><T></pre>"},
|
||||
|
||||
@ -168,7 +168,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
"Annotation Type AnnotationType</h2>"},
|
||||
//Make sure the signature is correct.
|
||||
{BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
|
||||
"public @interface <strong>AnnotationType</strong>"},
|
||||
"public @interface <span class=\"strong\">AnnotationType</span>"},
|
||||
//Make sure member summary headings are correct.
|
||||
{BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
|
||||
"<h3>Required Element Summary</h3>"},
|
||||
@ -198,8 +198,8 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
"<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" +
|
||||
"=\"Class Annotation\"," + NL +
|
||||
" <a href=\"../pkg/AnnotationType.html#required()\">" +
|
||||
"required</a>=1994)" + NL + "public class <strong>" +
|
||||
"AnnotationTypeUsage</strong>" + NL + "extends java.lang.Object</pre>"},
|
||||
"required</a>=1994)" + NL + "public class <span class=\"strong\">" +
|
||||
"AnnotationTypeUsage</span>" + NL + "extends java.lang.Object</pre>"},
|
||||
|
||||
//FIELD
|
||||
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
|
||||
@ -299,7 +299,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
{BUG_ID + FS + "pkg1" + FS + "B.html",
|
||||
"<pre><a href=\"../pkg1/A.html\" title=\"annotation in pkg1\">@A</a>"},
|
||||
{BUG_ID + FS + "pkg1" + FS + "B.html",
|
||||
"public interface <strong>B</strong></pre>"},
|
||||
"public interface <span class=\"strong\">B</span></pre>"},
|
||||
|
||||
|
||||
//==============================================================
|
||||
@ -320,9 +320,11 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
"Foo</a></span><span class=\"tabEnd\"> </span></caption>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html",
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/" +
|
||||
"ClassUseTest1.html\" title=\"class in pkg2\">ClassUseTest1" +
|
||||
"<T extends Foo & Foo2></a></strong></code> </td>"
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/ClassUseTest1.html\" " +
|
||||
"title=\"class in pkg2\">ClassUseTest1</a><T extends " +
|
||||
"<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo" +
|
||||
"</a> & <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">" +
|
||||
"Foo2</a>></strong></code> </td>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html",
|
||||
"<caption><span>Methods in <a href=\"../../pkg2/" +
|
||||
@ -370,10 +372,11 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
"</span></caption>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html",
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/" +
|
||||
"ClassUseTest1.html\" title=\"class in pkg2\">" +
|
||||
"ClassUseTest1<T extends Foo & Foo2></a></strong>" +
|
||||
"</code> </td>"
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/ClassUseTest1.html\" " +
|
||||
"title=\"class in pkg2\">ClassUseTest1</a><T extends " +
|
||||
"<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo" +
|
||||
"</a> & <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">" +
|
||||
"Foo2</a>></strong></code> </td>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html",
|
||||
"<caption><span>Methods in <a href=\"../../pkg2/" +
|
||||
@ -398,10 +401,11 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
" </span></caption>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html",
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/" +
|
||||
"ClassUseTest2.html\" title=\"class in pkg2\">ClassUseTest2<T " +
|
||||
"extends ParamTest<<a href=\"../../pkg2/Foo3.html\" title=\"class " +
|
||||
"in pkg2\">Foo3</a>>></a></strong></code> </td>"
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/ClassUseTest2.html\" " +
|
||||
"title=\"class in pkg2\">ClassUseTest2</a><T extends " +
|
||||
"<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">" +
|
||||
"ParamTest</a><<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" +
|
||||
"Foo3</a>>></strong></code> </td>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html",
|
||||
"<caption><span>Methods in <a href=\"../../pkg2/" +
|
||||
@ -452,11 +456,11 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
"Foo3</a></span><span class=\"tabEnd\"> </span></caption>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html",
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../" +
|
||||
"pkg2/ClassUseTest2.html\" title=\"class in pkg2\">" +
|
||||
"ClassUseTest2<T extends ParamTest<<a href=\"../../" +
|
||||
"pkg2/Foo3.html\" title=\"class in pkg2\">Foo3</a>>>" +
|
||||
"</a></strong></code> </td>"
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/ClassUseTest2.html\" " +
|
||||
"title=\"class in pkg2\">ClassUseTest2</a><T extends " +
|
||||
"<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">" +
|
||||
"ParamTest</a><<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" +
|
||||
"Foo3</a>>></strong></code> </td>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html",
|
||||
"<caption><span>Methods in <a href=\"../../pkg2/" +
|
||||
@ -496,10 +500,12 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
" </span></caption>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/" +
|
||||
"ClassUseTest3.html\" title=\"class in pkg2\">" +
|
||||
"ClassUseTest3<T extends ParamTest2<java.util.List" +
|
||||
"<? extends Foo4>>></a></strong></code> </td>"
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/ClassUseTest3.html\" " +
|
||||
"title=\"class in pkg2\">ClassUseTest3</a><T extends " +
|
||||
"<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">" +
|
||||
"ParamTest2</a><java.util.List<? extends " +
|
||||
"<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">" +
|
||||
"Foo4</a>>>></strong></code> </td>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
|
||||
"<caption><span>Methods in <a href=\"../../pkg2/" +
|
||||
@ -532,10 +538,12 @@ public class TestNewLanguageFeatures extends JavadocTester {
|
||||
"</span></caption>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html",
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../" +
|
||||
"pkg2/ClassUseTest3.html\" title=\"class in pkg2\">" +
|
||||
"ClassUseTest3<T extends ParamTest2<java.util.List" +
|
||||
"<? extends Foo4>>></a></strong></code> </td>"
|
||||
"<td class=\"colLast\"><code><strong><a href=\"../../pkg2/ClassUseTest3.html\" " +
|
||||
"title=\"class in pkg2\">ClassUseTest3</a><T extends " +
|
||||
"<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">" +
|
||||
"ParamTest2</a><java.util.List<? extends " +
|
||||
"<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">" +
|
||||
"Foo4</a>>>></strong></code> </td>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html",
|
||||
"<caption><span>Methods in <a href=\"../../pkg2/" +
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,55 +23,77 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 4927167 4974929
|
||||
* @bug 4927167 4974929 7010344
|
||||
* @summary When the type parameters are more than 10 characters in length,
|
||||
* make sure there is a line break between type params and return type
|
||||
* in member summary.
|
||||
* in member summary. Also, test for type parameter links in package-summary and
|
||||
* class-use pages. The class/annotation pages should check for type
|
||||
* parameter links in the class/annotation signature section when -linksource is set.
|
||||
* @author jamieh
|
||||
* @library ../lib/
|
||||
* @build JavadocTester
|
||||
* @build TestTypeParameters
|
||||
* @build JavadocTester TestTypeParameters
|
||||
* @run main TestTypeParameters
|
||||
*/
|
||||
|
||||
public class TestTypeParameters extends JavadocTester {
|
||||
|
||||
//Test information.
|
||||
private static final String BUG_ID = "4927167-4974929";
|
||||
private static final String BUG_ID = "4927167-4974929-7010344";
|
||||
|
||||
//Javadoc arguments.
|
||||
private static final String[] ARGS = new String[] {
|
||||
"-d", BUG_ID, "-source", "1.5", "-sourcepath", SRC_DIR,
|
||||
private static final String[] ARGS1 = new String[]{
|
||||
"-d", BUG_ID, "-use", "-source", "1.5", "-sourcepath", SRC_DIR,
|
||||
"pkg"
|
||||
};
|
||||
private static final String[] ARGS2 = new String[]{
|
||||
"-d", BUG_ID, "-linksource", "-source", "1.5", "-sourcepath", SRC_DIR,
|
||||
"pkg"
|
||||
};
|
||||
|
||||
//Input for string search tests.
|
||||
private static final String[][] TEST =
|
||||
{
|
||||
private static final String[][] TEST1 = {
|
||||
{BUG_ID + FS + "pkg" + FS + "C.html",
|
||||
"<td class=\"colFirst\"><code><W extends java.lang.String,V extends " +
|
||||
"java.util.List> <br>java.lang.Object</code></td>"},
|
||||
"java.util.List> <br>java.lang.Object</code></td>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg" + FS + "C.html",
|
||||
"<code><T> java.lang.Object</code>"},
|
||||
"<code><T> java.lang.Object</code>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg" + FS + "package-summary.html",
|
||||
"C<E extends Parent>"},
|
||||
"C</a><E extends <a href=\"../pkg/Parent.html\" " +
|
||||
"title=\"class in pkg\">Parent</a>>"
|
||||
},
|
||||
{BUG_ID + FS + "pkg" + FS + "class-use" + FS + "Foo4.html",
|
||||
"<a href=\"../../pkg/ClassUseTest3.html\" title=\"class in pkg\">" +
|
||||
"ClassUseTest3</a><T extends <a href=\"../../pkg/ParamTest2.html\" " +
|
||||
"title=\"class in pkg\">ParamTest2</a><java.util.List<? extends " +
|
||||
"<a href=\"../../pkg/Foo4.html\" title=\"class in pkg\">Foo4</a>>>>"
|
||||
},
|
||||
//Nested type parameters
|
||||
{BUG_ID + FS + "pkg" + FS + "C.html",
|
||||
"<a name=\"formatDetails(java.util.Collection, java.util.Collection)\">" + NL +
|
||||
"<!-- -->" + NL +
|
||||
"</a>"},
|
||||
|
||||
"</a>"
|
||||
},
|
||||
};
|
||||
private static final String[][] TEST2 = {
|
||||
{BUG_ID + FS + "pkg" + FS + "ClassUseTest3.html",
|
||||
"public class <a href=\"../src-html/pkg/ClassUseTest3.html#line.28\">" +
|
||||
"ClassUseTest3</a><T extends <a href=\"../pkg/ParamTest2.html\" " +
|
||||
"title=\"class in pkg\">ParamTest2</a><java.util.List<? extends " +
|
||||
"<a href=\"../pkg/Foo4.html\" title=\"class in pkg\">Foo4</a>>>>"
|
||||
}
|
||||
};
|
||||
private static final String[][] NEGATED_TEST = NO_TEST;
|
||||
|
||||
|
||||
/**
|
||||
* The entry point of the test.
|
||||
* @param args the array of command line arguments.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
TestTypeParameters tester = new TestTypeParameters();
|
||||
run(tester, ARGS, TEST, NEGATED_TEST);
|
||||
run(tester, ARGS1, TEST1, NEGATED_TEST);
|
||||
run(tester, ARGS2, TEST2, NEGATED_TEST);
|
||||
tester.printSummary();
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package pkg;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class ClassUseTest3 <T extends ParamTest2<List<? extends Foo4>>> {
|
||||
|
||||
public ClassUseTest3(Set<Foo4> p) {}
|
||||
|
||||
public <T extends ParamTest2<List<? extends Foo4>>> ParamTest2<List<? extends Foo4>> method(T t) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void method(Set<Foo4> p) {}
|
||||
}
|
26
langtools/test/com/sun/javadoc/testTypeParams/pkg/Foo4.java
Normal file
26
langtools/test/com/sun/javadoc/testTypeParams/pkg/Foo4.java
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package pkg;
|
||||
|
||||
public class Foo4 {}
|
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package pkg;
|
||||
|
||||
public class ParamTest2<E> {
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user