Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
402f04ad
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看板
提交
402f04ad
编写于
8月 20, 2013
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8020663: Restructure some properties to facilitate better translation
Reviewed-by: darcy
上级
9e33fb4b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
19 deletion
+38
-19
src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties
...ols/doclets/internal/toolkit/resources/doclets.properties
+19
-12
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
...ses/com/sun/tools/doclets/internal/toolkit/util/Util.java
+19
-7
未找到文件。
src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties
浏览文件 @
402f04ad
...
...
@@ -176,25 +176,32 @@ doclet.Value=Value
doclet.0_and_1
=
{0} and {1}
#Documentation for Enums
doclet.enum_values_doc
=
\n\
doclet.enum_values_doc
.main
=
\n\
Returns an array containing the constants of this enum type, in
\n\
the order they are declared. This method may be used to iterate
\n\
over the constants as follows:
\n\
<pre>
\n\
for ({0} c : {0}.values())
\n\
System.out.println(c);
\n\
</pre>
\n\
@return an array containing the constants of this enum type, in
\n\
the order they are declared
</pre>
doclet.enum_valueof_doc
=
\n\
doclet.enum_values_doc.return
=
\n\
an array containing the constants of this enum type, in the order they are declared
doclet.enum_valueof_doc.main
=
\n\
Returns the enum constant of this type with the specified name.
\n\
The string must match <i>exactly</i> an identifier used to declare an
\n\
enum constant in this type. (Extraneous whitespace characters are
\n\
not permitted.)
\n\
\n\
@param name the name of the enum constant to be returned.
\n\
@return the enum constant with the specified name
\n\
@throws IllegalArgumentException if this enum type has no constant
\n\
with the specified name
\n\
@throws NullPointerException if the argument is null
not permitted.)
doclet.enum_valueof_doc.param_name
=
\
the name of the enum constant to be returned.
doclet.enum_valueof_doc.return
=
\
the enum constant with the specified name
doclet.enum_valueof_doc.throws_ila
=
\
if this enum type has no constant with the specified name
doclet.enum_valueof_doc.throws_npe
=
\
if the argument is null
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
浏览文件 @
402f04ad
...
...
@@ -667,16 +667,28 @@ public class Util {
for
(
int
j
=
0
;
j
<
methods
.
length
;
j
++)
{
MethodDoc
currentMethod
=
methods
[
j
];
if
(
currentMethod
.
name
().
equals
(
"values"
)
&&
currentMethod
.
parameters
().
length
==
0
)
{
currentMethod
.
setRawCommentText
(
configuration
.
getText
(
"doclet.enum_values_doc"
,
classDoc
.
name
()));
currentMethod
.
parameters
().
length
==
0
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
configuration
.
getText
(
"doclet.enum_values_doc.main"
,
classDoc
.
name
()));
sb
.
append
(
"\n@return "
);
sb
.
append
(
configuration
.
getText
(
"doclet.enum_values_doc.return"
));
currentMethod
.
setRawCommentText
(
sb
.
toString
());
}
else
if
(
currentMethod
.
name
().
equals
(
"valueOf"
)
&&
currentMethod
.
parameters
().
length
==
1
)
{
currentMethod
.
parameters
().
length
==
1
)
{
Type
paramType
=
currentMethod
.
parameters
()[
0
].
type
();
if
(
paramType
!=
null
&&
paramType
.
qualifiedTypeName
().
equals
(
String
.
class
.
getName
()))
{
currentMethod
.
setRawCommentText
(
configuration
.
getText
(
"doclet.enum_valueof_doc"
));
paramType
.
qualifiedTypeName
().
equals
(
String
.
class
.
getName
()))
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
configuration
.
getText
(
"doclet.enum_valueof_doc.main"
,
classDoc
.
name
()));
sb
.
append
(
"\n@param name "
);
sb
.
append
(
configuration
.
getText
(
"doclet.enum_valueof_doc.param_name"
));
sb
.
append
(
"\n@return "
);
sb
.
append
(
configuration
.
getText
(
"doclet.enum_valueof_doc.return"
));
sb
.
append
(
"\n@throws IllegalArgumentException "
);
sb
.
append
(
configuration
.
getText
(
"doclet.enum_valueof_doc.throws_ila"
));
sb
.
append
(
"\n@throws NullPointerException "
);
sb
.
append
(
configuration
.
getText
(
"doclet.enum_valueof_doc.throws_npe"
));
currentMethod
.
setRawCommentText
(
sb
.
toString
());
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录