6469561: javadoc for annotation types should not display "public abstract" modifiers on methods
6469562: Use compact notation to display annotation values Reviewed-by: jjg
This commit is contained in:
parent
88a8d4719e
commit
f14d43a22b
@ -261,10 +261,13 @@ public abstract class AbstractMemberWriter {
|
|||||||
// According to JLS, we should not be showing public modifier for
|
// According to JLS, we should not be showing public modifier for
|
||||||
// interface methods.
|
// interface methods.
|
||||||
if ((utils.isField(member) || utils.isMethod(member))
|
if ((utils.isField(member) || utils.isMethod(member))
|
||||||
&& writer instanceof ClassWriterImpl
|
&& ((writer instanceof ClassWriterImpl
|
||||||
&& utils.isInterface(((ClassWriterImpl) writer).getTypeElement())) {
|
&& utils.isInterface(((ClassWriterImpl) writer).getTypeElement()) ||
|
||||||
|
writer instanceof AnnotationTypeWriterImpl) )) {
|
||||||
// Remove the implicit abstract and public modifiers
|
// Remove the implicit abstract and public modifiers
|
||||||
if (utils.isMethod(member) && utils.isInterface(member.getEnclosingElement())) {
|
if (utils.isMethod(member) &&
|
||||||
|
(utils.isInterface(member.getEnclosingElement()) ||
|
||||||
|
utils.isAnnotationType(member.getEnclosingElement()))) {
|
||||||
set.remove(ABSTRACT);
|
set.remove(ABSTRACT);
|
||||||
set.remove(PUBLIC);
|
set.remove(PUBLIC);
|
||||||
}
|
}
|
||||||
|
@ -2363,7 +2363,9 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
if (!map.isEmpty()) {
|
if (!map.isEmpty()) {
|
||||||
annotation.addContent("(");
|
annotation.addContent("(");
|
||||||
boolean isFirst = true;
|
boolean isFirst = true;
|
||||||
for (ExecutableElement element : map.keySet()) {
|
Set<? extends ExecutableElement> keys = map.keySet();
|
||||||
|
boolean multipleValues = keys.size() > 1;
|
||||||
|
for (ExecutableElement element : keys) {
|
||||||
if (isFirst) {
|
if (isFirst) {
|
||||||
isFirst = false;
|
isFirst = false;
|
||||||
} else {
|
} else {
|
||||||
@ -2376,9 +2378,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
String simpleName = element.getSimpleName().toString();
|
||||||
|
if (multipleValues || !"value".equals(simpleName)) { // Omit "value=" where unnecessary
|
||||||
annotation.addContent(getDocLink(LinkInfoImpl.Kind.ANNOTATION,
|
annotation.addContent(getDocLink(LinkInfoImpl.Kind.ANNOTATION,
|
||||||
element, element.getSimpleName().toString(), false));
|
element, simpleName, false));
|
||||||
annotation.addContent("=");
|
annotation.addContent("=");
|
||||||
|
}
|
||||||
AnnotationValue annotationValue = map.get(element);
|
AnnotationValue annotationValue = map.get(element);
|
||||||
List<AnnotationValue> annotationTypeValues = new ArrayList<>();
|
List<AnnotationValue> annotationTypeValues = new ArrayList<>();
|
||||||
new SimpleAnnotationValueVisitor9<Void, AnnotationValue>() {
|
new SimpleAnnotationValueVisitor9<Void, AnnotationValue>() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 4973609 8015249 8025633 8026567
|
* @bug 4973609 8015249 8025633 8026567 6469561
|
||||||
* @summary Make sure that annotation types with 0 members does not have
|
* @summary Make sure that annotation types with 0 members does not have
|
||||||
* extra HR tags.
|
* extra HR tags.
|
||||||
* @author jamieh
|
* @author jamieh
|
||||||
@ -61,7 +61,7 @@ public class TestAnnotationTypes extends JavadocTester {
|
|||||||
+ "</code> </td>",
|
+ "</code> </td>",
|
||||||
"<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->",
|
"<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->",
|
||||||
"<h4>DEFAULT_NAME</h4>\n"
|
"<h4>DEFAULT_NAME</h4>\n"
|
||||||
+ "<pre>public static final java."
|
+ "<pre>static final java."
|
||||||
+ "lang.String DEFAULT_NAME</pre>");
|
+ "lang.String DEFAULT_NAME</pre>");
|
||||||
|
|
||||||
checkOutput("pkg/AnnotationType.html", true,
|
checkOutput("pkg/AnnotationType.html", true,
|
||||||
@ -70,6 +70,21 @@ public class TestAnnotationTypes extends JavadocTester {
|
|||||||
"<li>Detail: </li>\n"
|
"<li>Detail: </li>\n"
|
||||||
+ "<li>Field | </li>");
|
+ "<li>Field | </li>");
|
||||||
|
|
||||||
|
checkOutput("pkg/AnnotationType.html", true,
|
||||||
|
"<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->",
|
||||||
|
"<ul class=\"blockList\">",
|
||||||
|
"<li class=\"blockList\"><a name=\"annotation.type.element.detail\">",
|
||||||
|
"<!-- -->",
|
||||||
|
"</a>",
|
||||||
|
"<h3>Element Detail</h3>",
|
||||||
|
"<a name=\"value--\">",
|
||||||
|
"<!-- -->",
|
||||||
|
"</a>",
|
||||||
|
"<ul class=\"blockListLast\">",
|
||||||
|
"<li class=\"blockList\">",
|
||||||
|
"<h4>value</h4>",
|
||||||
|
"<pre>int value</pre>" );
|
||||||
|
|
||||||
checkOutput("pkg/AnnotationType.html", false,
|
checkOutput("pkg/AnnotationType.html", false,
|
||||||
"<HR>\n\n"
|
"<HR>\n\n"
|
||||||
+ "<P>\n\n"
|
+ "<P>\n\n"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -32,5 +32,5 @@ import java.lang.annotation.*;
|
|||||||
* @since 1.5
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
@Documented public @interface AnnotationType {
|
@Documented public @interface AnnotationType {
|
||||||
|
int value();
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8005092
|
* @bug 8005092 6469562
|
||||||
* @summary Test repeated annotations output.
|
* @summary Test repeated annotations output.
|
||||||
* @author bpatel
|
* @author bpatel
|
||||||
* @library ../lib
|
* @library ../lib
|
||||||
@ -57,7 +57,7 @@ public class TestRepeatedAnnotations extends JavadocTester {
|
|||||||
+ "title=\"annotation in pkg\">@ContaineeRegDoc</a>",
|
+ "title=\"annotation in pkg\">@ContaineeRegDoc</a>",
|
||||||
"<a href=\"../pkg/RegContainerDoc.html\" "
|
"<a href=\"../pkg/RegContainerDoc.html\" "
|
||||||
+ "title=\"annotation in pkg\">@RegContainerDoc</a>"
|
+ "title=\"annotation in pkg\">@RegContainerDoc</a>"
|
||||||
+ "(<a href=\"../pkg/RegContainerDoc.html#value--\">value</a>={"
|
+ "({"
|
||||||
+ "<a href=\"../pkg/RegContaineeNotDoc.html\" "
|
+ "<a href=\"../pkg/RegContaineeNotDoc.html\" "
|
||||||
+ "title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
|
+ "title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
|
||||||
+ "<a href=\"../pkg/RegContaineeNotDoc.html\" "
|
+ "<a href=\"../pkg/RegContaineeNotDoc.html\" "
|
||||||
@ -70,7 +70,7 @@ public class TestRepeatedAnnotations extends JavadocTester {
|
|||||||
+ "title=\"annotation in pkg\">@ContaineeSynthDoc</a>",
|
+ "title=\"annotation in pkg\">@ContaineeSynthDoc</a>",
|
||||||
"<a href=\"../pkg/ContainerSynthDoc.html\" "
|
"<a href=\"../pkg/ContainerSynthDoc.html\" "
|
||||||
+ "title=\"annotation in pkg\">@ContainerSynthDoc</a>("
|
+ "title=\"annotation in pkg\">@ContainerSynthDoc</a>("
|
||||||
+ "<a href=\"../pkg/ContainerSynthDoc.html#value--\">value</a>="
|
+ ""
|
||||||
+ "<a href=\"../pkg/ContaineeSynthDoc.html\" "
|
+ "<a href=\"../pkg/ContaineeSynthDoc.html\" "
|
||||||
+ "title=\"annotation in pkg\">@ContaineeSynthDoc</a>)",
|
+ "title=\"annotation in pkg\">@ContaineeSynthDoc</a>)",
|
||||||
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
|
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
|
||||||
@ -87,7 +87,7 @@ public class TestRepeatedAnnotations extends JavadocTester {
|
|||||||
+ "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})",
|
+ "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})",
|
||||||
"<a href=\"../pkg/NonSynthDocContainer.html\" "
|
"<a href=\"../pkg/NonSynthDocContainer.html\" "
|
||||||
+ "title=\"annotation in pkg\">@NonSynthDocContainer</a>"
|
+ "title=\"annotation in pkg\">@NonSynthDocContainer</a>"
|
||||||
+ "(<a href=\"../pkg/NonSynthDocContainer.html#value--\">value</a>="
|
+ "("
|
||||||
+ "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>)");
|
+ "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>)");
|
||||||
|
|
||||||
checkOutput("pkg1/C.html", true,
|
checkOutput("pkg1/C.html", true,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -23,15 +23,15 @@
|
|||||||
|
|
||||||
package pkg;
|
package pkg;
|
||||||
|
|
||||||
@ContainerSynthDoc(value={@ContaineeSynthDoc,@ContaineeSynthDoc})
|
@ContainerSynthDoc({@ContaineeSynthDoc,@ContaineeSynthDoc})
|
||||||
@ContainerRegDoc(value={@ContaineeRegDoc,@ContaineeRegDoc})
|
@ContainerRegDoc({@ContaineeRegDoc,@ContaineeRegDoc})
|
||||||
@RegContainerDoc(value={@RegContaineeNotDoc,@RegContaineeNotDoc})
|
@RegContainerDoc({@RegContaineeNotDoc,@RegContaineeNotDoc})
|
||||||
@ContainerRegNotDoc(value={@RegContaineeDoc,@RegContaineeDoc})
|
@ContainerRegNotDoc({@RegContaineeDoc,@RegContaineeDoc})
|
||||||
@RegContainerNotDoc(value={@RegContaineeNotDoc,@RegContaineeNotDoc})
|
@RegContainerNotDoc({@RegContaineeNotDoc,@RegContaineeNotDoc})
|
||||||
@ContaineeSynthDoc @ContaineeSynthDoc @ContaineeSynthDoc
|
@ContaineeSynthDoc @ContaineeSynthDoc @ContaineeSynthDoc
|
||||||
public class C {
|
public class C {
|
||||||
|
|
||||||
@ContainerSynthDoc(value={@ContaineeSynthDoc})
|
@ContainerSynthDoc({@ContaineeSynthDoc})
|
||||||
public void test1() {}
|
public void test1() {}
|
||||||
|
|
||||||
@ContaineeSynthDoc @ContaineeSynthDoc
|
@ContaineeSynthDoc @ContaineeSynthDoc
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -32,6 +32,6 @@ public class D {
|
|||||||
@RegArryDoc(y={1,2})
|
@RegArryDoc(y={1,2})
|
||||||
public void test2() {}
|
public void test2() {}
|
||||||
|
|
||||||
@NonSynthDocContainer(value={@RegArryDoc})
|
@NonSynthDocContainer({@RegArryDoc})
|
||||||
public void test3() {}
|
public void test3() {}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8005091 8009686 8025633 8026567
|
* @bug 8005091 8009686 8025633 8026567 6469562
|
||||||
* @summary Make sure that type annotations are displayed correctly
|
* @summary Make sure that type annotations are displayed correctly
|
||||||
* @author Bhavesh Patel
|
* @author Bhavesh Patel
|
||||||
* @library ../lib
|
* @library ../lib
|
||||||
@ -260,13 +260,13 @@ public class TestTypeAnnotations extends JavadocTester {
|
|||||||
checkOutput("typeannos/ThrWithValue.html", true,
|
checkOutput("typeannos/ThrWithValue.html", true,
|
||||||
"<pre>void oneException()\n"
|
"<pre>void oneException()\n"
|
||||||
+ " throws <a href=\"../typeannos/ThrB.html\" title=\""
|
+ " throws <a href=\"../typeannos/ThrB.html\" title=\""
|
||||||
+ "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/"
|
+ "annotation in typeannos\">@ThrB</a>("
|
||||||
+ "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>",
|
+ "\"m\") java.lang.Exception</pre>",
|
||||||
|
|
||||||
"<pre>void twoExceptions()\n"
|
"<pre>void twoExceptions()\n"
|
||||||
+ " throws <a href=\"../typeannos/ThrB.html\" title=\""
|
+ " throws <a href=\"../typeannos/ThrB.html\" title=\""
|
||||||
+ "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/"
|
+ "annotation in typeannos\">@ThrB</a>("
|
||||||
+ "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException,\n"
|
+ "\"m\") java.lang.RuntimeException,\n"
|
||||||
+ " <a href=\"../typeannos/ThrA.html\" title=\""
|
+ " <a href=\"../typeannos/ThrA.html\" title=\""
|
||||||
+ "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
|
+ "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
|
||||||
|
|
||||||
@ -293,14 +293,14 @@ public class TestTypeAnnotations extends JavadocTester {
|
|||||||
checkOutput("typeannos/BoundWithValue.html", true,
|
checkOutput("typeannos/BoundWithValue.html", true,
|
||||||
"<pre>void wcSuper(<a href=\"../typeannos/MyList.html\" title=\""
|
"<pre>void wcSuper(<a href=\"../typeannos/MyList.html\" title=\""
|
||||||
+ "class in typeannos\">MyList</a><? super <a href=\"../typeannos/"
|
+ "class in typeannos\">MyList</a><? super <a href=\"../typeannos/"
|
||||||
+ "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\""
|
+ "WldB.html\" title=\"annotation in typeannos\">@WldB</a>("
|
||||||
+ "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang."
|
+ "\"m\") java.lang."
|
||||||
+ "String> l)</pre>",
|
+ "String> l)</pre>",
|
||||||
|
|
||||||
"<pre><a href=\"../typeannos/MyList.html\" title=\"class in "
|
"<pre><a href=\"../typeannos/MyList.html\" title=\"class in "
|
||||||
+ "typeannos\">MyList</a><? extends <a href=\"../typeannos/WldB."
|
+ "typeannos\">MyList</a><? extends <a href=\"../typeannos/WldB."
|
||||||
+ "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../"
|
+ "html\" title=\"annotation in typeannos\">@WldB</a>("
|
||||||
+ "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String"
|
+ "\"m\") java.lang.String"
|
||||||
+ "> returnWcExtends()</pre>");
|
+ "> returnWcExtends()</pre>");
|
||||||
|
|
||||||
// Test for receiver annotations (Receivers.java).
|
// Test for receiver annotations (Receivers.java).
|
||||||
@ -314,7 +314,7 @@ public class TestTypeAnnotations extends JavadocTester {
|
|||||||
"<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrA."
|
"<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrA."
|
||||||
+ "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../"
|
+ "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../"
|
||||||
+ "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB"
|
+ "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB"
|
||||||
+ "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")"
|
+ "</a>(\"m\")"
|
||||||
+ " DefaultUnmodified this)</pre>",
|
+ " DefaultUnmodified this)</pre>",
|
||||||
|
|
||||||
"<pre><T extends java.lang.Runnable> void accept("
|
"<pre><T extends java.lang.Runnable> void accept("
|
||||||
@ -337,15 +337,15 @@ public class TestTypeAnnotations extends JavadocTester {
|
|||||||
checkOutput("typeannos/WithValue.html", true,
|
checkOutput("typeannos/WithValue.html", true,
|
||||||
"<pre><T extends java.lang.Runnable> void accept("
|
"<pre><T extends java.lang.Runnable> void accept("
|
||||||
+ "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in "
|
+ "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in "
|
||||||
+ "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">"
|
+ "typeannos\">@RcvrB</a>("
|
||||||
+ "value</a>=\"m\") WithValue this,\n"
|
+ "\"m\") WithValue this,\n"
|
||||||
+ " T r)\n"
|
+ " T r)\n"
|
||||||
+ " throws java.lang.Exception</pre>");
|
+ " throws java.lang.Exception</pre>");
|
||||||
|
|
||||||
checkOutput("typeannos/WithFinal.html", true,
|
checkOutput("typeannos/WithFinal.html", true,
|
||||||
"<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrB."
|
"<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrB."
|
||||||
+ "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../"
|
+ "html\" title=\"annotation in typeannos\">@RcvrB</a>("
|
||||||
+ "typeannos/RcvrB.html#value--\">value</a>=\"m\") WithFinal"
|
+ "\"m\") WithFinal"
|
||||||
+ " this)</pre>");
|
+ " this)</pre>");
|
||||||
|
|
||||||
checkOutput("typeannos/WithBody.html", true,
|
checkOutput("typeannos/WithBody.html", true,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -40,7 +40,7 @@ class ThrPublicModified {
|
|||||||
|
|
||||||
class ThrWithValue {
|
class ThrWithValue {
|
||||||
void oneException() throws @ThrB("m") Exception {}
|
void oneException() throws @ThrB("m") Exception {}
|
||||||
void twoExceptions() throws @ThrB(value="m") RuntimeException, @ThrA Exception {}
|
void twoExceptions() throws @ThrB("m") RuntimeException, @ThrA Exception {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
|
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -39,10 +39,10 @@ class BoundTest {
|
|||||||
|
|
||||||
class BoundWithValue {
|
class BoundWithValue {
|
||||||
void wcExtends(MyList<? extends @WldB("m") String> l) { }
|
void wcExtends(MyList<? extends @WldB("m") String> l) { }
|
||||||
void wcSuper(MyList<? super @WldB(value="m") String> l) { }
|
void wcSuper(MyList<? super @WldB("m") String> l) { }
|
||||||
|
|
||||||
MyList<? extends @WldB("m") String> returnWcExtends() { return null; }
|
MyList<? extends @WldB("m") String> returnWcExtends() { return null; }
|
||||||
MyList<? super @WldB(value="m") String> returnWcSuper() { return null; }
|
MyList<? super @WldB("m") String> returnWcSuper() { return null; }
|
||||||
MyList<? extends @WldB("m") MyList<? super @WldB("m") String>> complex() { return null; }
|
MyList<? extends @WldB("m") MyList<? super @WldB("m") String>> complex() { return null; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,10 +57,10 @@ class SelfTest {
|
|||||||
|
|
||||||
class SelfWithValue {
|
class SelfWithValue {
|
||||||
void wcExtends(MyList<@WldB("m") ?> l) { }
|
void wcExtends(MyList<@WldB("m") ?> l) { }
|
||||||
void wcSuper(MyList<@WldB(value="m") ?> l) { }
|
void wcSuper(MyList<@WldB("m") ?> l) { }
|
||||||
|
|
||||||
MyList<@WldB("m") ?> returnWcExtends() { return null; }
|
MyList<@WldB("m") ?> returnWcExtends() { return null; }
|
||||||
MyList<@WldB(value="m") ?> returnWcSuper() { return null; }
|
MyList<@WldB("m") ?> returnWcSuper() { return null; }
|
||||||
MyList<@WldB("m") ? extends MyList<@WldB("m") ? super String>> complex() { return null; }
|
MyList<@WldB("m") ? extends MyList<@WldB("m") ? super String>> complex() { return null; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user