Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
29f7d56d
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看板
提交
29f7d56d
编写于
5月 14, 2013
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
Reviewed-by: darcy
上级
9d6c634c
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
200 addition
and
192 deletion
+200
-192
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
.../com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java
...sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java
...un/tools/doclets/formats/html/HtmlSerialMethodWriter.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java
.../com/sun/tools/doclets/formats/html/TagletOutputImpl.java
+30
-18
src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
.../com/sun/tools/doclets/formats/html/TagletWriterImpl.java
+94
-91
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java
...un/tools/doclets/internal/toolkit/taglets/CodeTaglet.java
+3
-3
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java
...ls/doclets/internal/toolkit/taglets/InheritDocTaglet.java
+1
-1
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java
...tools/doclets/internal/toolkit/taglets/LiteralTaglet.java
+0
-1
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/Taglet.java
...om/sun/tools/doclets/internal/toolkit/taglets/Taglet.java
+3
-1
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java
.../tools/doclets/internal/toolkit/taglets/TagletOutput.java
+3
-6
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java
.../tools/doclets/internal/toolkit/taglets/TagletWriter.java
+0
-5
test/com/sun/javadoc/AuthorDD/AuthorDD.java
test/com/sun/javadoc/AuthorDD/AuthorDD.java
+3
-3
test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java
.../javadoc/testConstructorIndent/TestConstructorIndent.java
+3
-3
test/com/sun/javadoc/testHref/TestHref.java
test/com/sun/javadoc/testHref/TestHref.java
+2
-2
test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java
.../testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java
+31
-31
test/com/sun/javadoc/testJavaFX/TestJavaFX.java
test/com/sun/javadoc/testJavaFX/TestJavaFX.java
+1
-1
test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
...adoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
+4
-4
test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java
test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java
+5
-5
test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
...ormDeprecationInfo/TestSerializedFormDeprecationInfo.java
+5
-5
test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java
...un/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java
+2
-2
test/com/sun/javadoc/testSinceTag/TestSinceTag.java
test/com/sun/javadoc/testSinceTag/TestSinceTag.java
+3
-3
test/com/sun/javadoc/testValueTag/TestValueTag.java
test/com/sun/javadoc/testValueTag/TestValueTag.java
+1
-1
未找到文件。
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
浏览文件 @
29f7d56d
...
...
@@ -246,7 +246,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
if
(
doc
instanceof
MethodDoc
)
{
addMethodInfo
((
MethodDoc
)
doc
,
dl
);
}
TagletOutput
Impl
output
=
new
TagletOutputImpl
(
""
);
TagletOutput
output
=
new
TagletOutputImpl
(
);
TagletWriter
.
genTagOuput
(
configuration
.
tagletManager
,
doc
,
configuration
.
tagletManager
.
getCustomTags
(
doc
),
getTagletWriterInstance
(
false
),
output
);
...
...
@@ -266,7 +266,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* @return true if there are tags to be printed else return false.
*/
protected
boolean
hasSerializationOverviewTags
(
FieldDoc
field
)
{
TagletOutput
Impl
output
=
new
TagletOutputImpl
(
""
);
TagletOutput
output
=
new
TagletOutputImpl
(
);
TagletWriter
.
genTagOuput
(
configuration
.
tagletManager
,
field
,
configuration
.
tagletManager
.
getCustomTags
(
field
),
getTagletWriterInstance
(
false
),
output
);
...
...
src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java
浏览文件 @
29f7d56d
...
...
@@ -46,7 +46,7 @@ import com.sun.tools.doclets.internal.toolkit.taglets.*;
* @author Bhavesh Patel (Modified)
*/
public
class
HtmlSerialFieldWriter
extends
FieldWriterImpl
implements
SerializedFormWriter
.
SerialFieldWriter
{
implements
SerializedFormWriter
.
SerialFieldWriter
{
ProgramElementDoc
[]
members
=
null
;
private
boolean
printedOverallAnchor
=
false
;
...
...
@@ -186,7 +186,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param contentTree the tree to which the member tags info will be added
*/
public
void
addMemberTags
(
FieldDoc
field
,
Content
contentTree
)
{
TagletOutput
Impl
output
=
new
TagletOutputImpl
(
""
);
TagletOutput
output
=
new
TagletOutputImpl
(
);
TagletWriter
.
genTagOuput
(
configuration
.
tagletManager
,
field
,
configuration
.
tagletManager
.
getCustomTags
(
field
),
writer
.
getTagletWriterInstance
(
false
),
output
);
...
...
src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 1998, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
3
, 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
...
...
@@ -146,7 +146,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
* @param methodsContentTree the tree to which the member tags info will be added
*/
public
void
addMemberTags
(
MethodDoc
member
,
Content
methodsContentTree
)
{
TagletOutput
Impl
output
=
new
TagletOutputImpl
(
""
);
TagletOutput
output
=
new
TagletOutputImpl
(
);
TagletManager
tagletManager
=
configuration
.
tagletManager
;
TagletWriter
.
genTagOuput
(
tagletManager
,
member
,
...
...
src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, 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
...
...
@@ -25,6 +25,9 @@
package
com.sun.tools.doclets.formats.html
;
import
com.sun.tools.doclets.formats.html.markup.ContentBuilder
;
import
com.sun.tools.doclets.formats.html.markup.RawHtml
;
import
com.sun.tools.doclets.internal.toolkit.Content
;
import
com.sun.tools.doclets.internal.toolkit.taglets.*
;
/**
...
...
@@ -37,45 +40,54 @@ import com.sun.tools.doclets.internal.toolkit.taglets.*;
*
* @since 1.5
* @author Jamie Ho
* @author Jonathan Gibbons (rewrite)
*/
public
class
TagletOutputImpl
implements
TagletOutput
{
private
StringBuilder
output
;
private
ContentBuilder
content
;
public
TagletOutputImpl
()
{
content
=
new
ContentBuilder
();
}
public
TagletOutputImpl
(
String
o
)
{
setOutput
(
o
);
}
/**
* {@inheritDoc}
*/
public
void
setOutput
(
Object
o
)
{
output
=
new
StringBuilder
(
o
==
null
?
""
:
(
String
)
o
);
public
TagletOutputImpl
(
Content
c
)
{
setOutput
(
c
);
}
/**
* {@inheritDoc}
*/
public
void
appendOutput
(
TagletOutput
o
)
{
output
.
append
(
o
.
toString
());
public
void
setOutput
(
Object
o
)
{
content
=
new
ContentBuilder
();
if
(
o
!=
null
)
{
if
(
o
instanceof
String
)
content
.
addContent
(
new
RawHtml
((
String
)
o
));
else
if
(
o
instanceof
Content
)
content
.
addContent
((
Content
)
o
);
else
if
(
o
instanceof
TagletOutputImpl
)
content
.
addContent
(((
TagletOutputImpl
)
o
).
content
);
else
throw
new
IllegalArgumentException
(
o
.
getClass
().
getName
());
}
}
/**
* {@inheritDoc}
*/
public
boolean
hasInheritDocTag
()
{
return
output
.
indexOf
(
InheritDocTaglet
.
INHERIT_DOC_INLINE_TAG
)
!=
-
1
;
public
void
appendOutput
(
TagletOutput
o
)
{
if
(
o
instanceof
TagletOutputImpl
)
content
.
addContent
(((
TagletOutputImpl
)
o
).
content
);
else
throw
new
IllegalArgumentException
(
o
.
getClass
().
getName
());
}
public
String
toString
()
{
return
outpu
t
.
toString
();
return
conten
t
.
toString
();
}
/**
* Check whether the taglet output is empty.
*/
public
boolean
isEmpty
()
{
return
(
toString
().
trim
().
isEmpty
());
}
}
src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
浏览文件 @
29f7d56d
...
...
@@ -26,9 +26,12 @@
package
com.sun.tools.doclets.formats.html
;
import
com.sun.javadoc.*
;
import
com.sun.tools.doclets.formats.html.markup.ContentBuilder
;
import
com.sun.tools.doclets.formats.html.markup.HtmlAttr
;
import
com.sun.tools.doclets.formats.html.markup.HtmlStyle
;
import
com.sun.tools.doclets.formats.html.markup.HtmlTag
;
import
com.sun.tools.doclets.formats.html.markup.HtmlTree
;
import
com.sun.tools.doclets.formats.html.markup.RawHtml
;
import
com.sun.tools.doclets.formats.html.markup.StringContent
;
import
com.sun.tools.doclets.internal.toolkit.*
;
import
com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder
;
...
...
@@ -63,7 +66,7 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc}
*/
public
TagletOutput
getOutputInstance
()
{
return
new
TagletOutputImpl
(
""
);
return
new
TagletOutputImpl
();
}
/**
...
...
@@ -71,7 +74,7 @@ public class TagletWriterImpl extends TagletWriter {
*/
protected
TagletOutput
codeTagOutput
(
Tag
tag
)
{
Content
result
=
HtmlTree
.
CODE
(
new
StringContent
(
tag
.
text
()));
return
new
TagletOutputImpl
(
result
.
toString
()
);
return
new
TagletOutputImpl
(
result
);
}
/**
...
...
@@ -90,18 +93,17 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc}
*/
public
TagletOutput
deprecatedTagOutput
(
Doc
doc
)
{
StringBuilder
output
=
new
String
Builder
();
ContentBuilder
result
=
new
Content
Builder
();
Tag
[]
deprs
=
doc
.
tags
(
"deprecated"
);
if
(
doc
instanceof
ClassDoc
)
{
if
(
Util
.
isDeprecated
((
ProgramElementDoc
)
doc
))
{
output
.
append
(
"<span class=\"strong\">"
+
configuration
.
getText
(
"doclet.Deprecated"
)
+
"</span> "
);
result
.
addContent
(
HtmlTree
.
SPAN
(
HtmlStyle
.
strong
,
new
StringContent
(
configuration
.
getText
(
"doclet.Deprecated"
))));
result
.
addContent
(
RawHtml
.
nbsp
);
if
(
deprs
.
length
>
0
)
{
Tag
[]
commentTags
=
deprs
[
0
].
inlineTags
();
if
(
commentTags
.
length
>
0
)
{
output
.
append
(
commentTagsToOutput
(
null
,
doc
,
result
.
addContent
(
commentTagsToOutput
(
null
,
doc
,
deprs
[
0
].
inlineTags
(),
false
).
toString
()
);
}
...
...
@@ -110,24 +112,23 @@ public class TagletWriterImpl extends TagletWriter {
}
else
{
MemberDoc
member
=
(
MemberDoc
)
doc
;
if
(
Util
.
isDeprecated
((
ProgramElementDoc
)
doc
))
{
output
.
append
(
"<span class=\"strong\">"
+
configuration
.
getText
(
"doclet.Deprecated"
)
+
"</span> "
);
result
.
addContent
(
HtmlTree
.
SPAN
(
HtmlStyle
.
strong
,
new
StringContent
(
configuration
.
getText
(
"doclet.Deprecated"
))));
result
.
addContent
(
RawHtml
.
nbsp
);
if
(
deprs
.
length
>
0
)
{
output
.
append
(
"<i>"
);
output
.
append
(
commentTagsToOutput
(
null
,
doc
,
deprs
[
0
].
inlineTags
(),
false
).
toString
());
output
.
append
(
"</i>"
);
TagletOutput
body
=
commentTagsToOutput
(
null
,
doc
,
deprs
[
0
].
inlineTags
(),
false
);
result
.
addContent
(
HtmlTree
.
I
(
new
RawHtml
(
body
.
toString
())));
}
}
else
{
if
(
Util
.
isDeprecated
(
member
.
containingClass
()))
{
output
.
append
(
"<span class=\"strong\">"
+
configuration
.
getText
(
"doclet.Deprecated"
)
+
"</span> "
);
result
.
addContent
(
HtmlTree
.
SPAN
(
HtmlStyle
.
strong
,
new
StringContent
(
configuration
.
getText
(
"doclet.Deprecated"
))));
result
.
addContent
(
RawHtml
.
nbsp
);
}
}
}
return
new
TagletOutputImpl
(
output
.
toString
()
);
return
new
TagletOutputImpl
(
result
);
}
/**
...
...
@@ -136,7 +137,7 @@ public class TagletWriterImpl extends TagletWriter {
protected
TagletOutput
expertTagOutput
(
Tag
tag
)
{
HtmlTree
result
=
new
HtmlTree
(
HtmlTag
.
SUB
,
new
StringContent
(
tag
.
text
()));
result
.
addAttr
(
HtmlAttr
.
ID
,
"expert"
);
return
new
TagletOutputImpl
(
result
.
toString
()
);
return
new
TagletOutputImpl
(
result
);
}
/**
...
...
@@ -144,7 +145,7 @@ public class TagletWriterImpl extends TagletWriter {
*/
protected
TagletOutput
literalTagOutput
(
Tag
tag
)
{
Content
result
=
new
StringContent
(
tag
.
text
());
return
new
TagletOutputImpl
(
result
.
toString
()
);
return
new
TagletOutputImpl
(
result
);
}
/**
...
...
@@ -158,95 +159,102 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc}
*/
public
TagletOutput
getParamHeader
(
String
header
)
{
StringBuilder
result
=
new
StringBuilder
();
result
.
append
(
"<dt>"
);
result
.
append
(
"<span class=\"strong\">"
).
append
(
header
).
append
(
"</span></dt>"
);
return
new
TagletOutputImpl
(
result
.
toString
());
HtmlTree
result
=
HtmlTree
.
DT
(
HtmlTree
.
SPAN
(
HtmlStyle
.
strong
,
new
StringContent
(
header
)));
return
new
TagletOutputImpl
(
result
);
}
/**
* {@inheritDoc}
*/
public
TagletOutput
paramTagOutput
(
ParamTag
paramTag
,
String
paramName
)
{
TagletOutput
result
=
new
TagletOutputImpl
(
"<dd><code>"
+
paramName
+
"</code>"
+
" - "
+
htmlWriter
.
commentTagsToString
(
paramTag
,
null
,
paramTag
.
inlineTags
(),
false
)
+
"</dd>"
);
return
result
;
ContentBuilder
body
=
new
ContentBuilder
();
body
.
addContent
(
HtmlTree
.
CODE
(
new
RawHtml
(
paramName
)));
body
.
addContent
(
" - "
);
body
.
addContent
(
new
RawHtml
(
htmlWriter
.
commentTagsToString
(
paramTag
,
null
,
paramTag
.
inlineTags
(),
false
)));
HtmlTree
result
=
HtmlTree
.
DD
(
body
);
return
new
TagletOutputImpl
(
result
);
}
/**
* {@inheritDoc}
*/
public
TagletOutput
returnTagOutput
(
Tag
returnTag
)
{
TagletOutput
result
=
new
TagletOutputImpl
(
DocletConstants
.
NL
+
"<dt>"
+
"<span class=\"strong\">"
+
configuration
.
getText
(
"doclet.Returns"
)
+
"</span>"
+
"</dt>"
+
"<dd>"
+
htmlWriter
.
commentTagsToString
(
returnTag
,
null
,
returnTag
.
inlineTags
(),
false
)
+
"</dd>"
);
return
result
;
ContentBuilder
result
=
new
ContentBuilder
();
result
.
addContent
(
HtmlTree
.
DT
(
HtmlTree
.
SPAN
(
HtmlStyle
.
strong
,
new
StringContent
(
configuration
.
getText
(
"doclet.Returns"
)))));
result
.
addContent
(
HtmlTree
.
DD
(
new
RawHtml
(
htmlWriter
.
commentTagsToString
(
returnTag
,
null
,
returnTag
.
inlineTags
(),
false
)))
);
return
new
TagletOutputImpl
(
result
)
;
}
/**
* {@inheritDoc}
*/
public
TagletOutput
seeTagOutput
(
Doc
holder
,
SeeTag
[]
seeTags
)
{
String
result
=
""
;
ContentBuilder
body
=
new
ContentBuilder
()
;
if
(
seeTags
.
length
>
0
)
{
result
=
addSeeHeader
(
result
);
for
(
int
i
=
0
;
i
<
seeTags
.
length
;
++
i
)
{
if
(
i
>
0
)
{
result
+=
", "
+
DocletConstants
.
NL
;
}
result
+=
htmlWriter
.
seeTagToString
(
seeTags
[
i
]);
appendSeparatorIfNotEmpty
(
body
);
body
.
addContent
(
new
RawHtml
(
htmlWriter
.
seeTagToString
(
seeTags
[
i
])));
}
}
if
(
holder
.
isField
()
&&
((
FieldDoc
)
holder
).
constantValue
()
!=
null
&&
htmlWriter
instanceof
ClassWriterImpl
)
{
//Automatically add link to constant values page for constant fields.
result
=
addSeeHeader
(
result
);
appendSeparatorIfNotEmpty
(
body
);
DocPath
constantsPath
=
htmlWriter
.
pathToRoot
.
resolve
(
DocPaths
.
CONSTANT_VALUES
);
String
whichConstant
=
((
ClassWriterImpl
)
htmlWriter
).
getClassDoc
().
qualifiedName
()
+
"."
+
((
FieldDoc
)
holder
).
name
();
DocLink
link
=
constantsPath
.
fragment
(
whichConstant
);
result
+=
htmlWriter
.
getHyperLinkString
(
link
,
configuration
.
getText
(
"doclet.Constants_Summary"
));
body
.
addContent
(
htmlWriter
.
getHyperLink
(
link
,
new
StringContent
(
configuration
.
getText
(
"doclet.Constants_Summary"
))
));
}
if
(
holder
.
isClass
()
&&
((
ClassDoc
)
holder
).
isSerializable
())
{
//Automatically add link to serialized form page for serializable classes.
if
((
SerializedFormBuilder
.
serialInclude
(
holder
)
&&
SerializedFormBuilder
.
serialInclude
(((
ClassDoc
)
holder
).
containingPackage
())))
{
result
=
addSeeHeader
(
result
);
appendSeparatorIfNotEmpty
(
body
);
DocPath
serialPath
=
htmlWriter
.
pathToRoot
.
resolve
(
DocPaths
.
SERIALIZED_FORM
);
DocLink
link
=
serialPath
.
fragment
(((
ClassDoc
)
holder
).
qualifiedName
());
result
+=
htmlWriter
.
getHyperLinkString
(
link
,
configuration
.
getText
(
"doclet.Serialized_Form"
));
body
.
addContent
(
htmlWriter
.
getHyperLink
(
link
,
new
StringContent
(
configuration
.
getText
(
"doclet.Serialized_Form"
))
));
}
}
return
result
.
equals
(
""
)
?
null
:
new
TagletOutputImpl
(
result
+
"</dd>"
);
if
(
body
.
isEmpty
())
return
new
TagletOutputImpl
(
body
);
ContentBuilder
result
=
new
ContentBuilder
();
result
.
addContent
(
HtmlTree
.
DT
(
HtmlTree
.
SPAN
(
HtmlStyle
.
strong
,
new
StringContent
(
configuration
.
getText
(
"doclet.See_Also"
)))));
result
.
addContent
(
HtmlTree
.
DD
(
body
));
return
new
TagletOutputImpl
(
result
);
}
private
String
addSeeHeader
(
String
result
)
{
if
(
result
!=
null
&&
result
.
length
()
>
0
)
{
return
result
+
", "
+
DocletConstants
.
NL
;
}
else
{
return
"<dt><span class=\"strong\">"
+
configuration
.
getText
(
"doclet.See_Also"
)
+
"</span></dt><dd>"
;
private
void
appendSeparatorIfNotEmpty
(
ContentBuilder
body
)
{
if
(!
body
.
isEmpty
())
{
body
.
addContent
(
", "
);
body
.
addContent
(
DocletConstants
.
NL
);
}
}
}
/**
* {@inheritDoc}
*/
public
TagletOutput
simpleTagOutput
(
Tag
[]
simpleTags
,
String
header
)
{
String
result
=
"<dt><span class=\"strong\">"
+
header
+
"</span></dt>"
+
DocletConstants
.
NL
+
" <dd>"
;
ContentBuilder
result
=
new
ContentBuilder
();
result
.
addContent
(
HtmlTree
.
DT
(
HtmlTree
.
SPAN
(
HtmlStyle
.
strong
,
new
RawHtml
(
header
))));
ContentBuilder
body
=
new
ContentBuilder
();
for
(
int
i
=
0
;
i
<
simpleTags
.
length
;
i
++)
{
if
(
i
>
0
)
{
result
+=
", "
;
body
.
addContent
(
", "
)
;
}
result
+=
htmlWriter
.
commentTagsToString
(
simpleTags
[
i
],
null
,
simpleTags
[
i
].
inlineTags
(),
false
);
body
.
addContent
(
new
RawHtml
(
htmlWriter
.
commentTagsToString
(
simpleTags
[
i
],
null
,
simpleTags
[
i
].
inlineTags
(),
false
)));
}
result
+=
"</dd>"
+
DocletConstants
.
NL
;
result
.
addContent
(
HtmlTree
.
DD
(
body
))
;
return
new
TagletOutputImpl
(
result
);
}
...
...
@@ -254,46 +262,50 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc}
*/
public
TagletOutput
simpleTagOutput
(
Tag
simpleTag
,
String
header
)
{
return
new
TagletOutputImpl
(
"<dt><span class=\"strong\">"
+
header
+
"</span></dt>"
+
" <dd>"
+
htmlWriter
.
commentTagsToString
(
simpleTag
,
null
,
simpleTag
.
inlineTags
(),
false
)
+
"</dd>"
+
DocletConstants
.
NL
);
ContentBuilder
result
=
new
ContentBuilder
();
result
.
addContent
(
HtmlTree
.
DT
(
HtmlTree
.
SPAN
(
HtmlStyle
.
strong
,
new
RawHtml
(
header
))));
Content
body
=
new
RawHtml
(
htmlWriter
.
commentTagsToString
(
simpleTag
,
null
,
simpleTag
.
inlineTags
(),
false
));
result
.
addContent
(
HtmlTree
.
DD
(
body
));
return
new
TagletOutputImpl
(
result
);
}
/**
* {@inheritDoc}
*/
public
TagletOutput
getThrowsHeader
()
{
return
new
TagletOutputImpl
(
DocletConstants
.
NL
+
"<dt>"
+
"<span class=\"strong\">"
+
configuration
.
getText
(
"doclet.Throws"
)
+
"</span></dt>"
);
HtmlTree
result
=
HtmlTree
.
DT
(
HtmlTree
.
SPAN
(
HtmlStyle
.
strong
,
new
StringContent
(
configuration
.
getText
(
"doclet.Throws"
))));
return
new
TagletOutputImpl
(
result
);
}
/**
* {@inheritDoc}
*/
public
TagletOutput
throwsTagOutput
(
ThrowsTag
throwsTag
)
{
String
result
=
DocletConstants
.
NL
+
"<dd>"
;
result
+=
throwsTag
.
exceptionType
()
==
null
?
htmlWriter
.
codeText
(
throwsTag
.
exceptionName
())
:
htmlWriter
.
codeText
(
ContentBuilder
body
=
new
ContentBuilder
();
Content
excName
=
(
throwsTag
.
exceptionType
()
==
null
)
?
new
RawHtml
(
throwsTag
.
exceptionName
())
:
htmlWriter
.
getLink
(
new
LinkInfoImpl
(
configuration
,
LinkInfoImpl
.
Kind
.
MEMBER
,
throwsTag
.
exceptionType
())).
toString
());
TagletOutput
text
=
new
TagletOutputImpl
(
htmlWriter
.
commentTagsToString
(
throwsTag
,
null
,
throwsTag
.
inlineTags
(),
false
));
if
(
text
!=
null
&&
text
.
toString
().
length
()
>
0
)
{
result
+=
" - "
+
text
;
throwsTag
.
exceptionType
()));
body
.
addContent
(
HtmlTree
.
CODE
(
excName
));
String
desc
=
htmlWriter
.
commentTagsToString
(
throwsTag
,
null
,
throwsTag
.
inlineTags
(),
false
);
if
(
desc
!=
null
&&
!
desc
.
isEmpty
())
{
body
.
addContent
(
" - "
);
body
.
addContent
(
new
RawHtml
(
desc
));
}
result
+=
"</dd>"
;
return
new
TagletOutputImpl
(
res
ult
);
HtmlTree
res2
=
HtmlTree
.
DD
(
body
)
;
return
new
TagletOutputImpl
(
res
2
);
}
/**
* {@inheritDoc}
*/
public
TagletOutput
throwsTagOutput
(
Type
throwsType
)
{
return
new
TagletOutputImpl
(
DocletConstants
.
NL
+
"<dd>"
+
htmlWriter
.
codeText
(
htmlWriter
.
getLink
(
new
LinkInfoImpl
(
configuration
,
LinkInfoImpl
.
Kind
.
MEMBER
,
throwsType
)).
toString
())
+
"</dd>"
);
HtmlTree
result
=
HtmlTree
.
DD
(
HtmlTree
.
CODE
(
htmlWriter
.
getLink
(
new
LinkInfoImpl
(
configuration
,
LinkInfoImpl
.
Kind
.
MEMBER
,
throwsType
))));
return
new
TagletOutputImpl
(
result
);
}
/**
...
...
@@ -303,7 +315,7 @@ public class TagletWriterImpl extends TagletWriter {
boolean
includeLink
)
{
return
new
TagletOutputImpl
(
includeLink
?
htmlWriter
.
getDocLink
(
LinkInfoImpl
.
Kind
.
VALUE_TAG
,
field
,
constantVal
,
false
)
.
toString
()
:
constantVal
);
constantVal
,
false
)
:
new
RawHtml
(
constantVal
)
);
}
/**
...
...
@@ -325,8 +337,8 @@ public class TagletWriterImpl extends TagletWriter {
*/
public
TagletOutput
commentTagsToOutput
(
Tag
holderTag
,
Doc
holderDoc
,
Tag
[]
tags
,
boolean
isFirstSentence
)
{
return
new
TagletOutputImpl
(
htmlWriter
.
commentTagsToString
(
holderTag
,
holderDoc
,
tags
,
isFirstSentence
));
return
new
TagletOutputImpl
(
new
RawHtml
(
htmlWriter
.
commentTagsToString
(
holderTag
,
holderDoc
,
tags
,
isFirstSentence
))
)
;
}
/**
...
...
@@ -335,13 +347,4 @@ public class TagletWriterImpl extends TagletWriter {
public
Configuration
configuration
()
{
return
configuration
;
}
/**
* Return an instance of a TagletWriter that knows how to write HTML.
*
* @return an instance of a TagletWriter that knows how to write HTML.
*/
public
TagletOutput
getTagletOutputInstance
()
{
return
new
TagletOutputImpl
(
""
);
}
}
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java
浏览文件 @
29f7d56d
...
...
@@ -53,12 +53,12 @@ public class CodeTaglet extends BaseInlineTaglet {
private
static
final
String
NAME
=
"code"
;
public
static
void
register
(
Map
<
String
,
Taglet
>
map
)
{
map
.
remove
(
NAME
);
map
.
put
(
NAME
,
new
CodeTaglet
());
map
.
remove
(
NAME
);
map
.
put
(
NAME
,
new
CodeTaglet
());
}
public
String
getName
()
{
return
NAME
;
return
NAME
;
}
/**
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java
浏览文件 @
29f7d56d
...
...
@@ -116,7 +116,7 @@ public class InheritDocTaglet extends BaseInlineTaglet {
*/
private
TagletOutput
retrieveInheritedDocumentation
(
TagletWriter
writer
,
ProgramElementDoc
ped
,
Tag
holderTag
,
boolean
isFirstSentence
)
{
TagletOutput
replacement
=
writer
.
get
Taglet
OutputInstance
();
TagletOutput
replacement
=
writer
.
getOutputInstance
();
Configuration
configuration
=
writer
.
configuration
();
Taglet
inheritableTaglet
=
holderTag
==
null
?
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java
浏览文件 @
29f7d56d
...
...
@@ -26,7 +26,6 @@ package com.sun.tools.doclets.internal.toolkit.taglets;
import
java.util.Map
;
import
com.sun.javadoc.Doc
;
import
com.sun.javadoc.Tag
;
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/Taglet.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003,
2013,
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
...
...
@@ -152,4 +152,6 @@ public interface Taglet {
*/
public
abstract
TagletOutput
getTagletOutput
(
Doc
holder
,
TagletWriter
writer
)
throws
IllegalArgumentException
;
@Override
public
abstract
String
toString
();
}
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, 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
...
...
@@ -52,9 +52,6 @@ public interface TagletOutput {
*/
public
abstract
void
appendOutput
(
TagletOutput
o
);
/**
* Return true if this output has any occurances of @inheritDoc.
* @return true if inheritDoc tag is found.
*/
public
abstract
boolean
hasInheritDocTag
();
@Override
public
String
toString
();
}
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java
浏览文件 @
29f7d56d
...
...
@@ -307,9 +307,4 @@ public abstract class TagletWriter {
* @return an instance of the configuration used for this doclet.
*/
public
abstract
Configuration
configuration
();
/**
* @return an instance of the taglet output object.
*/
public
abstract
TagletOutput
getTagletOutputInstance
();
}
test/com/sun/javadoc/AuthorDD/AuthorDD.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 2002, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 201
3
, 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
...
...
@@ -86,12 +86,12 @@ public class AuthorDD
// Test single @since tag:
{
"<dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>JDK 1.0</dd>"
,
{
"<dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"<dd>JDK 1.0</dd>"
,
BUGID
+
FS
+
"p1"
+
FS
+
"C1.html"
},
// Test multiple @author tags:
{
"<dt><span class=\"strong\">Author:</span></dt>"
+
NL
+
"
<dd>Doug Kramer, Jamie, Neal</dd>"
,
{
"<dt><span class=\"strong\">Author:</span></dt>"
+
NL
+
"<dd>Doug Kramer, Jamie, Neal</dd>"
,
BUGID
+
FS
+
"p1"
+
FS
+
"C1.html"
},
};
...
...
test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 2003, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, 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
...
...
@@ -47,8 +47,8 @@ public class TestConstructorIndent extends JavadocTester {
private
static
final
String
[][]
TEST
=
{
{
BUG_ID
+
FS
+
"C.html"
,
"<div class=\"block\">"
+
"This is just a simple constructor.</div>"
+
NL
+
"<dl><dt><span class=\"strong\">Parameters:</span></dt>
<dd>"
+
"<code>i</code> - a param.</dd></dl>"
"<dl><dt><span class=\"strong\">Parameters:</span></dt>
"
+
NL
+
"<
dd><
code>i</code> - a param.</dd></dl>"
}
};
private
static
final
String
[][]
NEGATED_TEST
=
NO_TEST
;
...
...
test/com/sun/javadoc/testHref/TestHref.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 2003, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, 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
...
...
@@ -70,7 +70,7 @@ public class TestHref extends JavadocTester {
},
//@see test.
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C2.html"
,
"See Also:</span></dt><dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
"See Also:</span></dt>
"
+
NL
+
"
<dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
},
//Header does not link to the page itself.
...
...
test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java
浏览文件 @
29f7d56d
...
...
@@ -55,43 +55,43 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
private
static
final
String
[][]
TEST_CMNT_DEPR
=
{
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"package-summary.html"
,
"<dl>"
+
"<dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>JDK1.0</dd></dl>"
},
"<dd>JDK1.0</dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>JDK1.0</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span></dt>"
+
"
<dd>JDK1.0</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span></dt>"
+
NL
+
"<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>"
+
"C2</code></a>, "
+
NL
+
"<a href=\"../serialized-form.html#pkg1.C1\">"
+
"Serialized Form</a></dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span></dt><dd>"
+
"<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span></dt>
"
+
NL
+
"
<dd>"
+
"<a href=\"../pkg1/C1.html#setUndecorated(boolean)\">"
+
"<code>setUndecorated(boolean)</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Parameters:</span></dt><dd><code>title"
+
"</code> - the title</dd><dd><code>test</code> - boolean value"
+
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Parameters:</span></dt>
"
+
NL
+
"
<dd><code>title"
+
"</code> - the title</dd>
"
+
NL
+
"
<dd><code>test</code> - boolean value"
+
"</dd>"
+
NL
+
"<dt><span class=\"strong\">Throws:</span></dt>"
+
NL
+
"<dd><code>java.lang.IllegalArgumentException</code> - if the "
+
"<code>owner</code>'s"
+
NL
+
" <code>GraphicsConfiguration</code> is not from a screen "
+
"device</dd>"
+
NL
+
"<dd><code>HeadlessException</code></dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Parameters:</span></dt><dd><code>undecorated"
+
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Parameters:</span></dt>
"
+
NL
+
"
<dd><code>undecorated"
+
"</code> - <code>true</code> if no decorations are"
+
NL
+
" to be enabled;"
+
NL
+
" <code>false</code> "
+
"if decorations are to be enabled.</dd><dt><span class=\"strong\">Since:"
+
"</span></dt>"
+
NL
+
"
<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span></dt><dd>"
+
"if decorations are to be enabled.</dd>
"
+
NL
+
"
<dt><span class=\"strong\">Since:"
+
"</span></dt>"
+
NL
+
"<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span></dt>
"
+
NL
+
"
<dd>"
+
"<a href=\"../pkg1/C1.html#readObject()\"><code>readObject()"
+
"</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Throws:</span></dt>"
+
NL
+
"<dd><code>java.io.IOException</code></dd><dt><span class=\"strong\">See Also:"
+
"</span></dt><dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">"
+
"<dd><code>java.io.IOException</code></dd>
"
+
NL
+
"
<dt><span class=\"strong\">See Also:"
+
"</span></dt>
"
+
NL
+
"
<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">"
+
"<code>setUndecorated(boolean)</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C2.html"
,
"<dl><dt><span class=\"strong\">Parameters:"
+
"</span></dt>
<dd><code>set</code> - boolean</dd>
<dt><span class=\"strong\">"
+
"Since:</span></dt>"
+
NL
+
"
<dd>1.4</dd></dl>"
},
"</span></dt>
"
+
NL
+
"<dd><code>set</code> - boolean</dd>"
+
NL
+
"
<dt><span class=\"strong\">"
+
"Since:</span></dt>"
+
NL
+
"<dd>1.4</dd></dl>"
},
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<dl><dt><span class=\"strong\">Throws:</span>"
+
"</dt>"
+
NL
+
"<dd><code>"
+
"java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>"
+
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"java.io.IOException</code></dd>
"
+
NL
+
"
<dt><span class=\"strong\">See Also:</span>"
+
"</dt>
"
+
NL
+
"
<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<span class=\"strong\">Deprecated.</span>"
+
" <i>As of JDK version 1.5, replaced by"
+
NL
+
...
...
@@ -99,8 +99,8 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
"<code>setUndecorated(boolean)</code></a>.</i></div>"
+
NL
+
"<div class=\"block\">This field indicates whether the C1 is "
+
"undecorated.</div>"
+
NL
+
" "
+
NL
+
"<dl><dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span>"
+
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span>"
+
"</dt>
"
+
NL
+
"
<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<span class=\"strong\">Deprecated.</span>"
+
" <i>As of JDK version 1.5, replaced by"
+
NL
+
...
...
@@ -123,34 +123,34 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
private
static
final
String
[][]
TEST_NODEPR
=
{
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"package-summary.html"
,
"<dl>"
+
"<dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>JDK1.0</dd></dl>"
},
"<dd>JDK1.0</dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Since:</span>"
+
"</dt>"
+
NL
+
"
<dd>JDK1.0</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:"
+
"</span></dt><dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">"
+
"</dt>"
+
NL
+
"<dd>JDK1.0</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:"
+
"</span></dt>
"
+
NL
+
"
<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">"
+
"<code>C2</code></a>, "
+
NL
+
"<a href=\"../serialized-form.html#pkg1.C1\">"
+
"Serialized Form</a></dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Parameters:"
+
"</span></dt>
<dd><code>title</code> - the title</dd>
<dd><code>"
+
"</span></dt>
"
+
NL
+
"<dd><code>title</code> - the title</dd>"
+
NL
+
"
<dd><code>"
+
"test</code> - boolean value</dd>"
+
NL
+
"<dt><span class=\"strong\">Throws:"
+
"</span></dt>"
+
NL
+
"<dd><code>java.lang.IllegalArgumentException"
+
"</code> - if the <code>owner</code>'s"
+
NL
+
" <code>GraphicsConfiguration"
+
"</code> is not from a screen device</dd>"
+
NL
+
"<dd><code>"
+
"HeadlessException</code></dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Parameters:"
+
"</span></dt><dd><code>undecorated</code> - <code>true</code>"
+
"</span></dt>
"
+
NL
+
"
<dd><code>undecorated</code> - <code>true</code>"
+
" if no decorations are"
+
NL
+
" to be enabled;"
+
NL
+
" <code>false</code> if decorations are to be enabled."
+
"</dd>
<dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"../pkg1/C1.html#readObject()\">"
+
"</dd>
"
+
NL
+
"<dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span></dt>
"
+
NL
+
"
<dd><a href=\"../pkg1/C1.html#readObject()\">"
+
"<code>readObject()</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Throws:</span>"
+
"</dt>"
+
NL
+
"<dd><code>java.io.IOException</code></dd><dt>"
+
"<span class=\"strong\">See Also:</span></dt><dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">"
+
"</dt>"
+
NL
+
"<dd><code>java.io.IOException</code></dd>
"
+
NL
+
"
<dt>"
+
"<span class=\"strong\">See Also:</span></dt>
"
+
NL
+
"
<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">"
+
"<code>setUndecorated(boolean)</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<dl><dt><span class=\"strong\">Throws:</span>"
+
"</dt>"
+
NL
+
"<dd><code>"
+
"java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>"
+
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"java.io.IOException</code></dd>
"
+
NL
+
"
<dt><span class=\"strong\">See Also:</span>"
+
"</dt>
"
+
NL
+
"
<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<span class=\"strong\">Deprecated.</span>"
+
" <i>As of JDK version 1.5, replaced by"
+
NL
+
...
...
@@ -158,8 +158,8 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
"<code>setUndecorated(boolean)</code></a>.</i></div>"
+
NL
+
"<div class=\"block\">This field indicates whether the C1 is "
+
"undecorated.</div>"
+
NL
+
" "
+
NL
+
"<dl><dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span>"
+
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span>"
+
"</dt>
"
+
NL
+
"
<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<span class=\"strong\">Deprecated.</span>"
+
" <i>As of JDK version 1.5, replaced by"
+
NL
+
...
...
test/com/sun/javadoc/testJavaFX/TestJavaFX.java
浏览文件 @
29f7d56d
...
...
@@ -38,7 +38,7 @@ public class TestJavaFX extends JavadocTester {
private
static
final
String
[][]
TEST
=
new
String
[][]
{
{
"./"
+
BUG_ID
+
"/C.html"
,
"<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, "
+
NL
+
"<dt><span class=\"strong\">See Also:</span></dt>
"
+
NL
+
"
<dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, "
+
NL
+
"<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"
},
{
"./"
+
BUG_ID
+
"/C.html"
,
"<pre>public final void setRate(double value)</pre>"
+
NL
+
...
...
test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
浏览文件 @
29f7d56d
...
...
@@ -80,11 +80,11 @@ public class TestNewLanguageFeatures extends JavadocTester {
"Class TypeParameters<E></h2>"
},
//Check class type parameters section.
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"TypeParameters.html"
,
"<dt><span class=\"strong\">Type Parameters:</span></dt><dd><code>E</code> - "
+
"<dt><span class=\"strong\">Type Parameters:</span></dt>
"
+
NL
+
"
<dd><code>E</code> - "
+
"the type parameter for this class."
},
//Type parameters in @see/@link
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"TypeParameters.html"
,
"<dl><dt><span class=\"strong\">See Also:</span></dt><dd>"
+
"<dl><dt><span class=\"strong\">See Also:</span></dt>
"
+
NL
+
"
<dd>"
+
"<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+
"<code>TypeParameters</code></a></dd></dl>"
},
//Method that uses class type parameter.
...
...
@@ -93,8 +93,8 @@ public class TestNewLanguageFeatures extends JavadocTester {
"parameter in TypeParameters\">E</a> param)"
},
//Method type parameter section.
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"TypeParameters.html"
,
"<span class=\"strong\">Type Parameters:</span></dt><dd><code>T</code> - This is the first "
+
"type parameter.</dd><dd><code>V</code> - This is the second type "
+
"<span class=\"strong\">Type Parameters:</span></dt>
"
+
NL
+
"
<dd><code>T</code> - This is the first "
+
"type parameter.</dd>
"
+
NL
+
"
<dd><code>V</code> - This is the second type "
+
"parameter."
},
//Signature of method with type parameters
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"TypeParameters.html"
,
...
...
test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 2003, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, 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
...
...
@@ -48,13 +48,13 @@ public class TestParamTaglet extends JavadocTester {
private
static
final
String
[][]
TEST
=
{
//Regular param tags.
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<span class=\"strong\">Parameters:</span></dt><dd><code>param1</code> - testing 1 2 3.</dd>"
+
"<dd><code>param2</code> - testing 1 2 3."
"<span class=\"strong\">Parameters:</span></dt>
"
+
NL
+
"
<dd><code>param1</code> - testing 1 2 3.</dd>"
+
NL
+
"<dd><code>param2</code> - testing 1 2 3."
},
//Param tags that don't match with any real parameters.
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"<span class=\"strong\">Parameters:</span></dt><dd><code><I>p1</I></code> - testing 1 2 3.</dd>"
+
"<dd><code><I>p2</I></code> - testing 1 2 3."
"<span class=\"strong\">Parameters:</span></dt>
"
+
NL
+
"
<dd><code><I>p1</I></code> - testing 1 2 3.</dd>"
+
NL
+
"<dd><code><I>p2</I></code> - testing 1 2 3."
},
//{@inherit} doc misuse does not cause doclet to throw exception.
// Param is printed with nothing inherited.
...
...
test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 2009, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 201
3
, 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
...
...
@@ -43,8 +43,8 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
private
static
final
String
[][]
TEST_CMNT_DEPR
=
{
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<dl>"
+
"<dt><span class=\"strong\">Throws:</span></dt>"
+
NL
+
"<dd><code>"
+
"java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>"
+
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"java.io.IOException</code></dd>
"
+
NL
+
"
<dt><span class=\"strong\">See Also:</span>"
+
"</dt>
"
+
NL
+
"
<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<span class=\"strong\">Deprecated.</span>"
+
" <i>As of JDK version 1.5, replaced by"
+
NL
+
...
...
@@ -53,8 +53,8 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
"<div class=\"block\">This field indicates whether the C1 "
+
"is undecorated.</div>"
+
NL
+
" "
+
NL
+
"<dl><dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span>"
+
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"<dd>1.4</dd>"
+
NL
+
"<dt><span class=\"strong\">See Also:</span>"
+
"</dt>
"
+
NL
+
"
<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"
},
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<span class=\"strong\">Deprecated.</span>"
+
" <i>As of JDK version 1.5, replaced by"
+
NL
+
...
...
test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java
浏览文件 @
29f7d56d
...
...
@@ -47,10 +47,10 @@ public class TestSimpleTagInherit extends JavadocTester {
private
static
final
String
[][]
TEST
=
{
{
BUG_ID
+
FS
+
"p"
+
FS
+
"TestClass.html"
,
"<dt><span class=\"strong\"><em>Custom:</em></span></dt>"
+
NL
+
"
<dd>doc for BaseClass class</dd>"
},
"<dd>doc for BaseClass class</dd>"
},
{
BUG_ID
+
FS
+
"p"
+
FS
+
"TestClass.html"
,
"<dt><span class=\"strong\"><em>Custom:</em></span></dt>"
+
NL
+
"
<dd>doc for BaseClass method</dd>"
}
"<dd>doc for BaseClass method</dd>"
}
};
private
static
final
String
[][]
NEGATED_TEST
=
NO_TEST
;
...
...
test/com/sun/javadoc/testSinceTag/TestSinceTag.java
浏览文件 @
29f7d56d
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012,
2013,
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
...
...
@@ -49,11 +49,11 @@ public class TestSinceTag extends JavadocTester {
private
static
final
String
[][]
TEST
=
{
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"C1.html"
,
"<dl><dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>JDK1.0</dd>"
"<dd>JDK1.0</dd>"
},
{
BUG_ID
+
FS
+
"serialized-form.html"
,
"<dl><dt><span class=\"strong\">Since:</span></dt>"
+
NL
+
"
<dd>1.4</dd>"
"<dd>1.4</dd>"
}
};
...
...
test/com/sun/javadoc/testValueTag/TestValueTag.java
浏览文件 @
29f7d56d
...
...
@@ -90,7 +90,7 @@ public class TestValueTag extends JavadocTester {
//Test @value tag used with custom tag.
{
BUG_ID
+
FS
+
"pkg1"
+
FS
+
"CustomTagUsage.html"
,
"<dt><span class=\"strong\">Todo:</span></dt>"
+
NL
+
"
<dd>the value of this constant is 55.</dd>"
},
"<dd>the value of this constant is 55.</dd>"
},
//Test @value warning printed when used with non-constant.
{
WARNING_OUTPUT
,
"warning - @value tag (which references nonConstant) "
+
"can only be used in constants."
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录