Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
317823e0
D
dragonwell8_langtools
项目概览
openanolis
/
dragonwell8_langtools
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_langtools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
317823e0
编写于
1月 05, 2013
作者:
B
bpatel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8005092: javadoc should check for synthesized bit on an annotation
Reviewed-by: jjg
上级
7ffa5c4c
变更
28
隐藏空白更改
内联
并排
Showing
28 changed file
with
1243 addition
and
28 deletion
+1243
-28
src/share/classes/com/sun/javadoc/AnnotationDesc.java
src/share/classes/com/sun/javadoc/AnnotationDesc.java
+6
-0
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
.../com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
+139
-28
src/share/classes/com/sun/tools/javadoc/AnnotationDescImpl.java
...are/classes/com/sun/tools/javadoc/AnnotationDescImpl.java
+9
-0
test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java
...adoc/testRepeatedAnnotations/TestRepeatedAnnotations.java
+187
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/C.java
test/com/sun/javadoc/testRepeatedAnnotations/pkg/C.java
+39
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContaineeRegDoc.java
.../javadoc/testRepeatedAnnotations/pkg/ContaineeRegDoc.java
+36
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContaineeSynthDoc.java
...avadoc/testRepeatedAnnotations/pkg/ContaineeSynthDoc.java
+37
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContainerRegDoc.java
.../javadoc/testRepeatedAnnotations/pkg/ContainerRegDoc.java
+38
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContainerRegNotDoc.java
...vadoc/testRepeatedAnnotations/pkg/ContainerRegNotDoc.java
+37
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContainerSynthDoc.java
...avadoc/testRepeatedAnnotations/pkg/ContainerSynthDoc.java
+39
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/D.java
test/com/sun/javadoc/testRepeatedAnnotations/pkg/D.java
+37
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/NonSynthDocContainer.java
...doc/testRepeatedAnnotations/pkg/NonSynthDocContainer.java
+38
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegArryDoc.java
...m/sun/javadoc/testRepeatedAnnotations/pkg/RegArryDoc.java
+38
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegContaineeDoc.java
.../javadoc/testRepeatedAnnotations/pkg/RegContaineeDoc.java
+36
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegContaineeNotDoc.java
...vadoc/testRepeatedAnnotations/pkg/RegContaineeNotDoc.java
+36
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegContainerDoc.java
.../javadoc/testRepeatedAnnotations/pkg/RegContainerDoc.java
+38
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegContainerNotDoc.java
...vadoc/testRepeatedAnnotations/pkg/RegContainerNotDoc.java
+37
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegDoc.java
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegDoc.java
+38
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/C.java
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/C.java
+38
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContaineeNotDoc.java
...javadoc/testRepeatedAnnotations/pkg1/ContaineeNotDoc.java
+36
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContaineeSynthDoc.java
...vadoc/testRepeatedAnnotations/pkg1/ContaineeSynthDoc.java
+37
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContainerSynthNotDoc.java
...oc/testRepeatedAnnotations/pkg1/ContainerSynthNotDoc.java
+38
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContainerValDoc.java
...javadoc/testRepeatedAnnotations/pkg1/ContainerValDoc.java
+40
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContainerValNotDoc.java
...adoc/testRepeatedAnnotations/pkg1/ContainerValNotDoc.java
+39
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/RegContaineeDoc.java
...javadoc/testRepeatedAnnotations/pkg1/RegContaineeDoc.java
+36
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/RegContaineeNotDoc.java
...adoc/testRepeatedAnnotations/pkg1/RegContaineeNotDoc.java
+35
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/RegContainerValDoc.java
...adoc/testRepeatedAnnotations/pkg1/RegContainerValDoc.java
+40
-0
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/RegContainerValNotDoc.java
...c/testRepeatedAnnotations/pkg1/RegContainerValNotDoc.java
+39
-0
未找到文件。
src/share/classes/com/sun/javadoc/AnnotationDesc.java
浏览文件 @
317823e0
...
...
@@ -52,6 +52,12 @@ public interface AnnotationDesc {
*/
ElementValuePair
[]
elementValues
();
/**
* Check for the synthesized bit on the annotation.
*
* @return true if the annotation is synthesized.
*/
boolean
isSynthesized
();
/**
* Represents an association between an annotation type element
...
...
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
浏览文件 @
317823e0
...
...
@@ -89,6 +89,16 @@ public class HtmlDocletWriter extends HtmlDocWriter {
*/
protected
boolean
printedAnnotationHeading
=
false
;
/**
* To check whether the repeated annotations is documented or not.
*/
private
boolean
isAnnotationDocumented
=
false
;
/**
* To check whether the container annotations is documented or not.
*/
private
boolean
isContainerDocumented
=
false
;
/**
* Constructor to construct the HtmlStandardWriter object.
*
...
...
@@ -1793,50 +1803,66 @@ public class HtmlDocletWriter extends HtmlDocWriter {
StringBuilder
annotation
;
for
(
int
i
=
0
;
i
<
descList
.
length
;
i
++)
{
AnnotationTypeDoc
annotationDoc
=
descList
[
i
].
annotationType
();
if
(!
Util
.
isDocumentedAnnotation
(
annotationDoc
)){
// If an annotation is not documented, do not add it to the list. If
// the annotation is of a repeatable type, and if it is not documented
// and also if its container annotation is not documented, do not add it
// to the list. If an annotation of a repeatable type is not documented
// but its container is documented, it will be added to the list.
if
(!
Util
.
isDocumentedAnnotation
(
annotationDoc
)
&&
(!
isAnnotationDocumented
&&
!
isContainerDocumented
))
{
continue
;
}
annotation
=
new
StringBuilder
();
isAnnotationDocumented
=
false
;
LinkInfoImpl
linkInfo
=
new
LinkInfoImpl
(
configuration
,
LinkInfoImpl
.
CONTEXT_ANNOTATION
,
annotationDoc
);
linkInfo
.
label
=
"@"
+
annotationDoc
.
name
();
annotation
.
append
(
getLink
(
linkInfo
));
AnnotationDesc
.
ElementValuePair
[]
pairs
=
descList
[
i
].
elementValues
();
if
(
pairs
.
length
>
0
)
{
annotation
.
append
(
'('
);
// If the annotation is synthesized, do not print the container.
if
(
descList
[
i
].
isSynthesized
())
{
for
(
int
j
=
0
;
j
<
pairs
.
length
;
j
++)
{
if
(
j
>
0
)
{
annotation
.
append
(
","
);
if
(
linkBreak
)
{
annotation
.
append
(
DocletConstants
.
NL
);
int
spaces
=
annotationDoc
.
name
().
length
()
+
2
;
for
(
int
k
=
0
;
k
<
(
spaces
+
indent
);
k
++)
{
annotation
.
append
(
' '
);
}
}
}
annotation
.
append
(
getDocLink
(
LinkInfoImpl
.
CONTEXT_ANNOTATION
,
pairs
[
j
].
element
(),
pairs
[
j
].
element
().
name
(),
false
));
annotation
.
append
(
'='
);
AnnotationValue
annotationValue
=
pairs
[
j
].
value
();
List
<
AnnotationValue
>
annotationTypeValues
=
new
ArrayList
<
AnnotationValue
>();
if
(
annotationValue
.
value
()
instanceof
AnnotationValue
[])
{
AnnotationValue
[]
annotationArray
=
(
AnnotationValue
[])
annotationValue
.
value
();
for
(
int
k
=
0
;
k
<
annotationArray
.
length
;
k
++)
{
annotationTypeValues
.
add
(
annotationArray
[
k
]);
}
(
AnnotationValue
[])
annotationValue
.
value
();
annotationTypeValues
.
addAll
(
Arrays
.
asList
(
annotationArray
));
}
else
{
annotationTypeValues
.
add
(
annotationValue
);
}
annotation
.
append
(
annotationTypeValues
.
size
()
==
1
?
""
:
"{"
);
for
(
Iterator
<
AnnotationValue
>
iter
=
annotationTypeValues
.
iterator
();
iter
.
hasNext
();
)
{
annotation
.
append
(
annotationValueToString
(
iter
.
next
()));
annotation
.
append
(
iter
.
hasNext
()
?
","
:
""
);
String
sep
=
""
;
for
(
AnnotationValue
av
:
annotationTypeValues
)
{
annotation
.
append
(
sep
);
annotation
.
append
(
annotationValueToString
(
av
));
sep
=
" "
;
}
annotation
.
append
(
annotationTypeValues
.
size
()
==
1
?
""
:
"}"
);
}
annotation
.
append
(
")"
);
}
else
if
(
isAnnotationArray
(
pairs
))
{
// If the container has 1 or more value defined and if the
// repeatable type annotation is not documented, do not print
// the container.
if
(
pairs
.
length
==
1
&&
isAnnotationDocumented
)
{
AnnotationValue
[]
annotationArray
=
(
AnnotationValue
[])
(
pairs
[
0
].
value
()).
value
();
List
<
AnnotationValue
>
annotationTypeValues
=
new
ArrayList
<
AnnotationValue
>();
annotationTypeValues
.
addAll
(
Arrays
.
asList
(
annotationArray
));
String
sep
=
""
;
for
(
AnnotationValue
av
:
annotationTypeValues
)
{
annotation
.
append
(
sep
);
annotation
.
append
(
annotationValueToString
(
av
));
sep
=
" "
;
}
}
// If the container has 1 or more value defined and if the
// repeatable type annotation is not documented, print the container.
else
{
addAnnotations
(
annotationDoc
,
linkInfo
,
annotation
,
pairs
,
indent
,
false
);
}
}
else
{
addAnnotations
(
annotationDoc
,
linkInfo
,
annotation
,
pairs
,
indent
,
linkBreak
);
}
annotation
.
append
(
linkBreak
?
DocletConstants
.
NL
:
""
);
results
.
add
(
annotation
.
toString
());
...
...
@@ -1844,6 +1870,91 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return
results
;
}
/**
* Add annotation to the annotation string.
*
* @param annotationDoc the annotation being documented
* @param linkInfo the information about the link
* @param annotation the annotation string to which the annotation will be added
* @param pairs annotation type element and value pairs
* @param indent the number of extra spaces to indent the annotations.
* @param linkBreak if true, add new line between each member value
*/
private
void
addAnnotations
(
AnnotationTypeDoc
annotationDoc
,
LinkInfoImpl
linkInfo
,
StringBuilder
annotation
,
AnnotationDesc
.
ElementValuePair
[]
pairs
,
int
indent
,
boolean
linkBreak
)
{
linkInfo
.
label
=
"@"
+
annotationDoc
.
name
();
annotation
.
append
(
getLink
(
linkInfo
));
if
(
pairs
.
length
>
0
)
{
annotation
.
append
(
'('
);
for
(
int
j
=
0
;
j
<
pairs
.
length
;
j
++)
{
if
(
j
>
0
)
{
annotation
.
append
(
","
);
if
(
linkBreak
)
{
annotation
.
append
(
DocletConstants
.
NL
);
int
spaces
=
annotationDoc
.
name
().
length
()
+
2
;
for
(
int
k
=
0
;
k
<
(
spaces
+
indent
);
k
++)
{
annotation
.
append
(
' '
);
}
}
}
annotation
.
append
(
getDocLink
(
LinkInfoImpl
.
CONTEXT_ANNOTATION
,
pairs
[
j
].
element
(),
pairs
[
j
].
element
().
name
(),
false
));
annotation
.
append
(
'='
);
AnnotationValue
annotationValue
=
pairs
[
j
].
value
();
List
<
AnnotationValue
>
annotationTypeValues
=
new
ArrayList
<
AnnotationValue
>();
if
(
annotationValue
.
value
()
instanceof
AnnotationValue
[])
{
AnnotationValue
[]
annotationArray
=
(
AnnotationValue
[])
annotationValue
.
value
();
annotationTypeValues
.
addAll
(
Arrays
.
asList
(
annotationArray
));
}
else
{
annotationTypeValues
.
add
(
annotationValue
);
}
annotation
.
append
(
annotationTypeValues
.
size
()
==
1
?
""
:
"{"
);
String
sep
=
""
;
for
(
AnnotationValue
av
:
annotationTypeValues
)
{
annotation
.
append
(
sep
);
annotation
.
append
(
annotationValueToString
(
av
));
sep
=
","
;
}
annotation
.
append
(
annotationTypeValues
.
size
()
==
1
?
""
:
"}"
);
isContainerDocumented
=
false
;
}
annotation
.
append
(
")"
);
}
}
/**
* Check if the annotation contains an array of annotation as a value. This
* check is to verify if a repeatable type annotation is present or not.
*
* @param pairs annotation type element and value pairs
*
* @return true if the annotation contains an array of annotation as a value.
*/
private
boolean
isAnnotationArray
(
AnnotationDesc
.
ElementValuePair
[]
pairs
)
{
AnnotationValue
annotationValue
;
for
(
int
j
=
0
;
j
<
pairs
.
length
;
j
++)
{
annotationValue
=
pairs
[
j
].
value
();
if
(
annotationValue
.
value
()
instanceof
AnnotationValue
[])
{
AnnotationValue
[]
annotationArray
=
(
AnnotationValue
[])
annotationValue
.
value
();
if
(
annotationArray
.
length
>
1
)
{
if
(
annotationArray
[
0
].
value
()
instanceof
AnnotationDesc
)
{
AnnotationTypeDoc
annotationDoc
=
((
AnnotationDesc
)
annotationArray
[
0
].
value
()).
annotationType
();
isContainerDocumented
=
true
;
if
(
Util
.
isDocumentedAnnotation
(
annotationDoc
))
{
isAnnotationDocumented
=
true
;
}
return
true
;
}
}
}
}
return
false
;
}
private
String
annotationValueToString
(
AnnotationValue
annotationValue
)
{
if
(
annotationValue
.
value
()
instanceof
Type
)
{
Type
type
=
(
Type
)
annotationValue
.
value
();
...
...
src/share/classes/com/sun/tools/javadoc/AnnotationDescImpl.java
浏览文件 @
317823e0
...
...
@@ -88,6 +88,15 @@ public class AnnotationDescImpl implements AnnotationDesc {
return
res
;
}
/**
* Check for the synthesized bit on the annotation.
*
* @return true if the annotation is synthesized.
*/
public
boolean
isSynthesized
()
{
return
annotation
.
isSynthesized
();
}
/**
* Returns a string representation of this annotation.
* String is of one of the forms:
...
...
test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.
*/
/*
* @test
* @bug 8005092
* @summary Test repeated annotations output.
* @author bpatel
* @library ../lib/
* @build JavadocTester TestRepeatedAnnotations
* @run main TestRepeatedAnnotations
*/
public
class
TestRepeatedAnnotations
extends
JavadocTester
{
//Test information.
private
static
final
String
BUG_ID
=
"8005092"
;
//Javadoc arguments.
private
static
final
String
[]
ARGS
=
new
String
[]
{
"-d"
,
BUG_ID
,
"-sourcepath"
,
SRC_DIR
,
"pkg"
,
"pkg1"
};
//Input for string search tests.
private
static
final
String
[][]
TEST
=
{
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
+
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeSynthDoc</a>"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<a href=\"../pkg/ContaineeRegDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeRegDoc</a> "
+
"<a href=\"../pkg/ContaineeRegDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeRegDoc</a>"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<a href=\"../pkg/RegContainerDoc.html\" "
+
"title=\"annotation in pkg\">@RegContainerDoc</a>"
+
"(<a href=\"../pkg/RegContainerDoc.html#value()\">value</a>={"
+
"<a href=\"../pkg/RegContaineeNotDoc.html\" "
+
"title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
+
"<a href=\"../pkg/RegContaineeNotDoc.html\" "
+
"title=\"annotation in pkg\">@RegContaineeNotDoc</a>})"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
+
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
+
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeSynthDoc</a>"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<a href=\"../pkg/ContainerSynthDoc.html\" "
+
"title=\"annotation in pkg\">@ContainerSynthDoc</a>("
+
"<a href=\"../pkg/ContainerSynthDoc.html#value()\">value</a>="
+
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeSynthDoc</a>)"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
+
"<a href=\"../pkg/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg\">@ContaineeSynthDoc</a>"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"D.html"
,
"<a href=\"../pkg/RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>"
+
"(<a href=\"../pkg/RegDoc.html#x()\">x</a>=1)"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"D.html"
,
"<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+
"(<a href=\"../pkg/RegArryDoc.html#y()\">y</a>=1)"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"D.html"
,
"<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+
"(<a href=\"../pkg/RegArryDoc.html#y()\">y</a>={1,2})"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"D.html"
,
"<a href=\"../pkg/NonSynthDocContainer.html\" "
+
"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>)"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C.html"
,
"<a href=\"../pkg1/RegContainerValDoc.html\" "
+
"title=\"annotation in pkg1\">@RegContainerValDoc</a>"
+
"(<a href=\"../pkg1/RegContainerValDoc.html#value()\">value</a>={"
+
"<a href=\"../pkg1/RegContaineeNotDoc.html\" "
+
"title=\"annotation in pkg1\">@RegContaineeNotDoc</a>,"
+
"<a href=\"../pkg1/RegContaineeNotDoc.html\" "
+
"title=\"annotation in pkg1\">@RegContaineeNotDoc</a>},"
+
"<a href=\"../pkg1/RegContainerValDoc.html#y()\">y</a>=3)"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C.html"
,
"<a href=\"../pkg1/ContainerValDoc.html\" "
+
"title=\"annotation in pkg1\">@ContainerValDoc</a>"
+
"(<a href=\"../pkg1/ContainerValDoc.html#value()\">value</a>={"
+
"<a href=\"../pkg1/ContaineeNotDoc.html\" "
+
"title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
+
"<a href=\"../pkg1/ContaineeNotDoc.html\" "
+
"title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
+
"<a href=\"../pkg1/ContainerValDoc.html#x()\">x</a>=1)"
}
};
private
static
final
String
[][]
NEGATED_TEST
=
{
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<a href=\"../pkg/RegContaineeDoc.html\" "
+
"title=\"annotation in pkg\">@RegContaineeDoc</a> "
+
"<a href=\"../pkg/RegContaineeDoc.html\" "
+
"title=\"annotation in pkg\">@RegContaineeDoc</a>"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<a href=\"../pkg/RegContainerNotDoc.html\" "
+
"title=\"annotation in pkg\">@RegContainerNotDoc</a>"
+
"(<a href=\"../pkg/RegContainerNotDoc.html#value()\">value</a>={"
+
"<a href=\"../pkg/RegContaineeNotDoc.html\" "
+
"title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
+
"<a href=\"../pkg/RegContaineeNotDoc.html\" "
+
"title=\"annotation in pkg\">@RegContaineeNotDoc</a>})"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C.html"
,
"<a href=\"../pkg1/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg1\">@ContaineeSynthDoc</a> "
+
"<a href=\"../pkg1/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg1\">@ContaineeSynthDoc</a>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C.html"
,
"<a href=\"../pkg1/RegContainerValNotDoc.html\" "
+
"title=\"annotation in pkg1\">@RegContainerValNotDoc</a>"
+
"(<a href=\"../pkg1/RegContainerValNotDoc.html#value()\">value</a>={"
+
"<a href=\"../pkg1/RegContaineeDoc.html\" "
+
"title=\"annotation in pkg1\">@RegContaineeDoc</a>,"
+
"<a href=\"../pkg1/RegContaineeDoc.html\" "
+
"title=\"annotation in pkg1\">@RegContaineeDoc</a>},"
+
"<a href=\"../pkg1/RegContainerValNotDoc.html#y()\">y</a>=4)"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C.html"
,
"<a href=\"../pkg1/ContainerValNotDoc.html\" "
+
"title=\"annotation in pkg1\">@ContainerValNotDoc</a>"
+
"(<a href=\"../pkg1/ContainerValNotDoc.html#value()\">value</a>={"
+
"<a href=\"../pkg1/ContaineeNotDoc.html\" "
+
"title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
+
"<a href=\"../pkg1/ContaineeNotDoc.html\" "
+
"title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
+
"<a href=\"../pkg1/ContainerValNotDoc.html#x()\">x</a>=2)"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C.html"
,
"<a href=\"../pkg1/ContainerSynthNotDoc.html\" "
+
"title=\"annotation in pkg1\">@ContainerSynthNotDoc</a>("
+
"<a href=\"../pkg1/ContainerSynthNotDoc.html#value()\">value</a>="
+
"<a href=\"../pkg1/ContaineeSynthDoc.html\" "
+
"title=\"annotation in pkg1\">@ContaineeSynthDoc</a>)"
}
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public
static
void
main
(
String
[]
args
)
{
TestRepeatedAnnotations
tester
=
new
TestRepeatedAnnotations
();
run
(
tester
,
ARGS
,
TEST
,
NEGATED_TEST
);
tester
.
printSummary
();
}
/**
* {@inheritDoc}
*/
public
String
getBugId
()
{
return
BUG_ID
;
}
/**
* {@inheritDoc}
*/
public
String
getBugName
()
{
return
getClass
().
getName
();
}
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/C.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
;
@ContainerSynthDoc
(
value
={
@ContaineeSynthDoc
,
@ContaineeSynthDoc
})
@ContainerRegDoc
(
value
={
@ContaineeRegDoc
,
@ContaineeRegDoc
})
@RegContainerDoc
(
value
={
@RegContaineeNotDoc
,
@RegContaineeNotDoc
})
@ContainerRegNotDoc
(
value
={
@RegContaineeDoc
,
@RegContaineeDoc
})
@RegContainerNotDoc
(
value
={
@RegContaineeNotDoc
,
@RegContaineeNotDoc
})
@ContaineeSynthDoc
@ContaineeSynthDoc
@ContaineeSynthDoc
public
class
C
{
@ContainerSynthDoc
(
value
={
@ContaineeSynthDoc
})
public
void
test1
()
{}
@ContaineeSynthDoc
@ContaineeSynthDoc
public
void
test2
()
{}
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContaineeRegDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a documented annotation contained by ContainerRegDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
ContaineeRegDoc
{
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContaineeSynthDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a documented synthesized annotation contained by ContainerSynthDoc.
* It will be used to annotate Class C and a method in the class using a synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
@ContainedBy
(
ContainerSynthDoc
.
class
)
public
@interface
ContaineeSynthDoc
{
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContainerRegDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a documented annotation container for ContaineeRegDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
ContainerRegDoc
{
ContaineeRegDoc
[]
value
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContainerRegNotDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a non-documented annotation container for RegContaineeDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
public
@interface
ContainerRegNotDoc
{
RegContaineeDoc
[]
value
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContainerSynthDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a documented synthesized annotation container for ContaineeSynthDoc.
* It will be used to annotate Class C and a method in the class using a synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
@ContainerFor
(
ContaineeSynthDoc
.
class
)
public
@interface
ContainerSynthDoc
{
ContaineeSynthDoc
[]
value
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/D.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
;
@RegDoc
(
x
=
1
)
public
class
D
{
@RegArryDoc
(
y
={
1
})
public
void
test1
()
{}
@RegArryDoc
(
y
={
1
,
2
})
public
void
test2
()
{}
@NonSynthDocContainer
(
value
={
@RegArryDoc
})
public
void
test3
()
{}
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/NonSynthDocContainer.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a documented annotation.
* It will be used to annotate methods in class D.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
NonSynthDocContainer
{
RegArryDoc
[]
value
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegArryDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a documented annotation.
* It will be used to annotate methods in Class D.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
RegArryDoc
{
int
[]
y
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegContaineeDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a documented annotation contained by ContainerRegNotDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
RegContaineeDoc
{
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegContaineeNotDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a non-documented annotation contained by RegContainerNotDoc
* and RegContainerDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
public
@interface
RegContaineeNotDoc
{
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegContainerDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a documented annotation container for RegContainerDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
RegContainerDoc
{
RegContaineeNotDoc
[]
value
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegContainerNotDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a non-documented annotation container for RegContaineeNotDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
public
@interface
RegContainerNotDoc
{
RegContaineeNotDoc
[]
value
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg/RegDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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.lang.annotation.*
;
/**
* This annotation is a documented annotation.
* It will be used to annotate Class D.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
RegDoc
{
int
x
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/C.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
@ContainerSynthNotDoc
(
value
={
@ContaineeSynthDoc
,
@ContaineeSynthDoc
})
@RegContainerValDoc
(
value
={
@RegContaineeNotDoc
,
@RegContaineeNotDoc
},
y
=
3
)
@ContainerValDoc
(
value
={
@ContaineeNotDoc
,
@ContaineeNotDoc
},
x
=
1
)
@RegContainerValNotDoc
(
value
={
@RegContaineeDoc
,
@RegContaineeDoc
},
y
=
4
)
@ContainerValNotDoc
(
value
={
@ContaineeNotDoc
,
@ContaineeNotDoc
},
x
=
2
)
public
class
C
{
@ContainerSynthNotDoc
(
value
={
@ContaineeSynthDoc
})
public
void
test1
()
{}
@ContaineeSynthDoc
@ContaineeSynthDoc
public
void
test2
()
{}
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContaineeNotDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
import
java.lang.annotation.*
;
/**
* This annotation is a non-documented annotation contained by ContainerValNotDoc
* and ContainerValDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
public
@interface
ContaineeNotDoc
{
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContaineeSynthDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
import
java.lang.annotation.*
;
/**
* This annotation is a documented synthesized annotation contained by ContainerSynthNotDoc.
* It will be used to annotate Class C and methods in the class using a synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
@ContainedBy
(
ContainerSynthNotDoc
.
class
)
public
@interface
ContaineeSynthDoc
{
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContainerSynthNotDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
import
java.lang.annotation.*
;
/**
* This annotation is a non-documented synthesized annotation container for ContaineeSynthDoc.
* It will be used to annotate Class C and methods in the class using a synthesized form.
*
* @author Bhavesh Patel
*/
@ContainerFor
(
ContaineeSynthDoc
.
class
)
public
@interface
ContainerSynthNotDoc
{
ContaineeSynthDoc
[]
value
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContainerValDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
import
java.lang.annotation.*
;
/**
* This annotation is a documented annotation container for ContaineeNotDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
ContainerValDoc
{
ContaineeNotDoc
[]
value
();
int
x
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContainerValNotDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
import
java.lang.annotation.*
;
/**
* This annotation is a non-documented annotation container for ContaineeNotDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
public
@interface
ContainerValNotDoc
{
ContaineeNotDoc
[]
value
();
int
x
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/RegContaineeDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
import
java.lang.annotation.*
;
/**
* This annotation is a documented annotation contained by RegContainerValNotDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
RegContaineeDoc
{
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/RegContaineeNotDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
import
java.lang.annotation.*
;
/**
* This annotation is a non-documented annotation contained by RegContainerValDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
public
@interface
RegContaineeNotDoc
{
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/RegContainerValDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
import
java.lang.annotation.*
;
/**
* This annotation is a documented annotation container for RegContaineeNotDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
@Documented
public
@interface
RegContainerValDoc
{
RegContaineeNotDoc
[]
value
();
int
y
();
}
test/com/sun/javadoc/testRepeatedAnnotations/pkg1/RegContainerValNotDoc.java
0 → 100644
浏览文件 @
317823e0
/*
* Copyright (c) 2012, 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
pkg1
;
import
java.lang.annotation.*
;
/**
* This annotation is a non-documented annotation container for RegContaineeDoc.
* It will be used to annotate Class C using a non-synthesized form.
*
* @author Bhavesh Patel
*/
public
@interface
RegContainerValNotDoc
{
RegContaineeDoc
[]
value
();
int
y
();
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录