Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
e7f84922
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看板
提交
e7f84922
编写于
10月 15, 2008
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6748541: javadoc should be reusable
Reviewed-by: bpatel
上级
f711caf7
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
54 addition
and
62 deletion
+54
-62
src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
...com/sun/tools/doclets/formats/html/ConfigurationImpl.java
+11
-2
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
...lasses/com/sun/tools/doclets/formats/html/HtmlDoclet.java
+10
-4
src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.java
...com/sun/tools/doclets/formats/html/WriterFactoryImpl.java
+1
-15
src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
...om/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
+2
-1
src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
...com/sun/tools/doclets/internal/toolkit/Configuration.java
+5
-5
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java
...es/com/sun/tools/doclets/internal/toolkit/util/Group.java
+1
-10
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java
...sun/tools/doclets/internal/toolkit/util/MetaKeywords.java
+1
-15
test/com/sun/javadoc/AuthorDD/AuthorDD.java
test/com/sun/javadoc/AuthorDD/AuthorDD.java
+2
-1
test/com/sun/javadoc/lib/JavadocTester.java
test/com/sun/javadoc/lib/JavadocTester.java
+1
-0
test/tools/javadoc/BooleanConst.java
test/tools/javadoc/BooleanConst.java
+1
-1
test/tools/javadoc/BreakIteratorWarning.java
test/tools/javadoc/BreakIteratorWarning.java
+1
-0
test/tools/javadoc/FlagsTooEarly.java
test/tools/javadoc/FlagsTooEarly.java
+1
-0
test/tools/javadoc/InlineTagsWithBraces.java
test/tools/javadoc/InlineTagsWithBraces.java
+1
-0
test/tools/javadoc/LangVers.java
test/tools/javadoc/LangVers.java
+1
-0
test/tools/javadoc/MethodLinks.java
test/tools/javadoc/MethodLinks.java
+1
-1
test/tools/javadoc/NoStar.java
test/tools/javadoc/NoStar.java
+1
-1
test/tools/javadoc/T4994049/T4994049.java
test/tools/javadoc/T4994049/T4994049.java
+2
-1
test/tools/javadoc/XWerror.java
test/tools/javadoc/XWerror.java
+1
-1
test/tools/javadoc/completionFailure/CompletionFailure.java
test/tools/javadoc/completionFailure/CompletionFailure.java
+1
-0
test/tools/javadoc/dupOk/DupOk.java
test/tools/javadoc/dupOk/DupOk.java
+1
-1
test/tools/javadoc/imports/MissingImport.java
test/tools/javadoc/imports/MissingImport.java
+1
-0
test/tools/javadoc/lib/Tester.java
test/tools/javadoc/lib/Tester.java
+3
-1
test/tools/javadoc/nestedClass/NestedClass.java
test/tools/javadoc/nestedClass/NestedClass.java
+1
-1
test/tools/javadoc/sourceOnly/p/SourceOnly.java
test/tools/javadoc/sourceOnly/p/SourceOnly.java
+1
-1
test/tools/javadoc/sourceOption/SourceOption.java
test/tools/javadoc/sourceOption/SourceOption.java
+1
-0
test/tools/javadoc/subpackageIgnore/SubpackageIgnore.java
test/tools/javadoc/subpackageIgnore/SubpackageIgnore.java
+1
-0
未找到文件。
src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
浏览文件 @
e7f84922
...
...
@@ -51,7 +51,7 @@ import java.io.*;
*/
public
class
ConfigurationImpl
extends
Configuration
{
private
static
final
ConfigurationImpl
instance
=
new
ConfigurationImpl
();
private
static
ConfigurationImpl
instance
=
new
ConfigurationImpl
();
/**
* The build date. Note: For now, we will use
...
...
@@ -189,6 +189,15 @@ public class ConfigurationImpl extends Configuration {
"com.sun.tools.doclets.formats.html.resources.standard"
);
}
/**
* Reset to a fresh new ConfigurationImpl, to allow multiple invocations
* of javadoc within a single VM. It would be better not to be using
* static fields at all, but .... (sigh).
*/
public
static
void
reset
()
{
instance
=
new
ConfigurationImpl
();
}
public
static
ConfigurationImpl
getInstance
()
{
return
instance
;
}
...
...
@@ -475,7 +484,7 @@ public class ConfigurationImpl extends Configuration {
* {@inheritDoc}
*/
public
WriterFactory
getWriterFactory
()
{
return
WriterFactoryImpl
.
getInstance
(
);
return
new
WriterFactoryImpl
(
this
);
}
/**
...
...
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
浏览文件 @
e7f84922
...
...
@@ -41,12 +41,14 @@ import java.io.*;
*
*/
public
class
HtmlDoclet
extends
AbstractDoclet
{
public
HtmlDoclet
()
{
configuration
=
(
ConfigurationImpl
)
configuration
();
}
/**
* The global configuration information for this run.
*/
public
ConfigurationImpl
configuration
=
(
ConfigurationImpl
)
configuration
();
public
ConfigurationImpl
configuration
;
/**
* The "start" method as required by Javadoc.
...
...
@@ -56,8 +58,12 @@ public class HtmlDoclet extends AbstractDoclet {
* @return true if the doclet ran without encountering any errors.
*/
public
static
boolean
start
(
RootDoc
root
)
{
HtmlDoclet
doclet
=
new
HtmlDoclet
();
return
doclet
.
start
(
doclet
,
root
);
try
{
HtmlDoclet
doclet
=
new
HtmlDoclet
();
return
doclet
.
start
(
doclet
,
root
);
}
finally
{
ConfigurationImpl
.
reset
();
}
}
/**
...
...
src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.java
浏览文件 @
e7f84922
...
...
@@ -37,26 +37,12 @@ import com.sun.javadoc.*;
*/
public
class
WriterFactoryImpl
implements
WriterFactory
{
private
static
WriterFactoryImpl
instance
;
private
ConfigurationImpl
configuration
;
p
rivate
WriterFactoryImpl
(
ConfigurationImpl
configuration
)
{
p
ublic
WriterFactoryImpl
(
ConfigurationImpl
configuration
)
{
this
.
configuration
=
configuration
;
}
/**
* Return an instance of this factory.
*
* @return an instance of this factory.
*/
public
static
WriterFactoryImpl
getInstance
()
{
if
(
instance
==
null
)
{
instance
=
new
WriterFactoryImpl
(
ConfigurationImpl
.
getInstance
());
}
return
instance
;
}
/**
* {@inheritDoc}
*/
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
浏览文件 @
e7f84922
...
...
@@ -45,7 +45,7 @@ public abstract class AbstractDoclet {
/**
* The global configuration information for this run.
*/
public
Configuration
configuration
=
configuration
()
;
public
Configuration
configuration
;
/**
* The only doclet that may use this toolkit is {@value}
...
...
@@ -74,6 +74,7 @@ public abstract class AbstractDoclet {
* @return true if the doclet executed without error. False otherwise.
*/
public
boolean
start
(
AbstractDoclet
doclet
,
RootDoc
root
)
{
configuration
=
configuration
();
configuration
.
root
=
root
;
if
(!
isValidDoclet
(
doclet
))
{
return
false
;
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
浏览文件 @
e7f84922
...
...
@@ -113,9 +113,9 @@ public abstract class Configuration {
public
boolean
keywords
=
false
;
/**
* The meta tag keywords
sole-
instance.
* The meta tag keywords instance.
*/
public
final
MetaKeywords
metakeywords
=
MetaKeywords
.
getInstance
(
this
);
public
final
MetaKeywords
metakeywords
=
new
MetaKeywords
(
this
);
/**
* The list of doc-file subdirectories to exclude
...
...
@@ -211,12 +211,12 @@ public abstract class Configuration {
public
boolean
notimestamp
=
false
;
/**
* The package grouping
sole-
instance.
* The package grouping instance.
*/
public
final
Group
group
=
Group
.
getInstance
(
this
);
public
final
Group
group
=
new
Group
(
this
);
/**
* The tracker of external package links
(sole-instance)
.
* The tracker of external package links.
*/
public
final
Extern
extern
=
new
Extern
(
this
);
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java
浏览文件 @
e7f84922
...
...
@@ -56,8 +56,6 @@ import java.util.*;
*/
public
class
Group
{
private
static
Group
instance
;
/**
* Map of regular expressions with the corresponding group name.
*/
...
...
@@ -96,17 +94,10 @@ public class Group {
}
}
p
rivate
Group
(
Configuration
configuration
)
{
p
ublic
Group
(
Configuration
configuration
)
{
this
.
configuration
=
configuration
;
}
public
static
Group
getInstance
(
Configuration
configuration
)
{
if
(
instance
==
null
)
{
instance
=
new
Group
(
configuration
);
}
return
instance
;
}
/**
* Depending upon the format of the package name provided in the "-group"
* option, generate two separate maps. There will be a map for mapping
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java
浏览文件 @
e7f84922
...
...
@@ -43,8 +43,6 @@ import java.util.*;
*/
public
class
MetaKeywords
{
private
static
MetaKeywords
instance
=
null
;
/**
* The global configuration information for this run.
*/
...
...
@@ -53,22 +51,10 @@ public class MetaKeywords {
/**
* Constructor
*/
p
rivate
MetaKeywords
(
Configuration
configuration
)
{
p
ublic
MetaKeywords
(
Configuration
configuration
)
{
this
.
configuration
=
configuration
;
}
/**
* Return an instance of MetaKeywords. This class is a singleton.
*
* @param configuration the current configuration of the doclet.
*/
public
static
MetaKeywords
getInstance
(
Configuration
configuration
)
{
if
(
instance
==
null
)
{
instance
=
new
MetaKeywords
(
configuration
);
}
return
instance
;
}
/**
* Returns an array of strings where each element
* is a class, method or field name. This array is
...
...
test/com/sun/javadoc/AuthorDD/AuthorDD.java
浏览文件 @
e7f84922
...
...
@@ -72,7 +72,8 @@ public class AuthorDD
/** Run javadoc */
public
static
void
runJavadoc
(
String
[]
javadocArgs
)
{
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
javadocArgs
)
!=
0
)
{
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
AuthorDD
.
class
.
getClassLoader
(),
javadocArgs
)
!=
0
)
{
throw
new
Error
(
"Javadoc failed to execute"
);
}
}
...
...
test/com/sun/javadoc/lib/JavadocTester.java
浏览文件 @
e7f84922
...
...
@@ -197,6 +197,7 @@ public abstract class JavadocTester {
new
PrintWriter
(
warnings
,
true
),
new
PrintWriter
(
notices
,
true
),
docletClass
,
getClass
().
getClassLoader
(),
args
);
System
.
setOut
(
prev
);
standardOut
=
new
StringBuffer
(
stdout
.
toString
());
...
...
test/tools/javadoc/BooleanConst.java
浏览文件 @
e7f84922
...
...
@@ -37,7 +37,7 @@ public class BooleanConst extends Doclet
public
static
void
main
(
String
[]
args
)
{
// run javadoc on package p
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"BooleanConst"
,
execute
(
"javadoc"
,
"BooleanConst"
,
BooleanConst
.
class
.
getClassLoader
(),
new
String
[]
{
System
.
getProperty
(
"test.src"
,
"."
)
+
java
.
io
.
File
.
separatorChar
+
"BooleanConst.java"
})
!=
0
)
throw
new
Error
();
}
...
...
test/tools/javadoc/BreakIteratorWarning.java
浏览文件 @
e7f84922
...
...
@@ -41,6 +41,7 @@ public class BreakIteratorWarning extends Doclet {
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"BreakIteratorWarning"
,
BreakIteratorWarning
.
class
.
getClassLoader
(),
new
String
[]
{
"-Xwerror"
,
thisFile
})
!=
0
)
throw
new
Error
(
"Javadoc encountered warnings or errors."
);
}
...
...
test/tools/javadoc/FlagsTooEarly.java
浏览文件 @
e7f84922
...
...
@@ -40,6 +40,7 @@ public class FlagsTooEarly extends Doclet {
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"FlagsTooEarly"
,
FlagsTooEarly
.
class
.
getClassLoader
(),
new
String
[]
{
"-Xwerror"
,
thisFile
})
!=
0
)
throw
new
Error
(
"Javadoc encountered warnings or errors."
);
}
...
...
test/tools/javadoc/InlineTagsWithBraces.java
浏览文件 @
e7f84922
...
...
@@ -60,6 +60,7 @@ public class InlineTagsWithBraces extends Doclet {
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"InlineTagsWithBraces"
,
InlineTagsWithBraces
.
class
.
getClassLoader
(),
new
String
[]
{
"-Xwerror"
,
thisFile
})
!=
0
)
throw
new
Error
(
"Javadoc encountered warnings or errors."
);
}
...
...
test/tools/javadoc/LangVers.java
浏览文件 @
e7f84922
...
...
@@ -43,6 +43,7 @@ public class LangVers extends Doclet {
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"LangVers"
,
LangVers
.
class
.
getClassLoader
(),
new
String
[]
{
"-source"
,
"1.5"
,
thisFile
})
!=
0
)
throw
new
Error
(
"Javadoc encountered warnings or errors."
);
}
...
...
test/tools/javadoc/MethodLinks.java
浏览文件 @
e7f84922
...
...
@@ -36,7 +36,7 @@ public class MethodLinks extends Doclet
{
public
static
void
main
(
String
[]
args
)
{
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"MethodLinks"
,
execute
(
"javadoc"
,
"MethodLinks"
,
MethodLinks
.
class
.
getClassLoader
(),
new
String
[]
{
System
.
getProperty
(
"test.src"
,
"."
)
+
java
.
io
.
File
.
separatorChar
+
"MethodLinks.java"
}
)
!=
0
)
...
...
test/tools/javadoc/NoStar.java
浏览文件 @
e7f84922
...
...
@@ -44,7 +44,7 @@ public class NoStar extends Doclet
{
public
static
void
main
(
String
[]
args
)
{
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"NoStar"
,
execute
(
"javadoc"
,
"NoStar"
,
NoStar
.
class
.
getClassLoader
(),
new
String
[]
{
System
.
getProperty
(
"test.src"
,
"."
)
+
java
.
io
.
File
.
separatorChar
+
"NoStar.java"
})
!=
0
)
throw
new
Error
();
}
...
...
test/tools/javadoc/T4994049/T4994049.java
浏览文件 @
e7f84922
...
...
@@ -55,7 +55,8 @@ public class T4994049 extends Doclet {
public
static
void
main
(
String
...
args
)
{
for
(
String
file
:
args
)
{
File
source
=
new
File
(
System
.
getProperty
(
"test.src"
,
"."
),
file
);
if
(
execute
(
"javadoc"
,
"T4994049"
,
new
String
[]{
source
.
getPath
()}
)
!=
0
)
if
(
execute
(
"javadoc"
,
"T4994049"
,
T4994049
.
class
.
getClassLoader
(),
new
String
[]{
source
.
getPath
()}
)
!=
0
)
throw
new
Error
();
}
}
...
...
test/tools/javadoc/XWerror.java
浏览文件 @
e7f84922
...
...
@@ -36,7 +36,7 @@ public class XWerror extends Doclet
{
public
static
void
main
(
String
[]
args
)
{
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"XWerror"
,
execute
(
"javadoc"
,
"XWerror"
,
XWerror
.
class
.
getClassLoader
(),
new
String
[]
{
"-Xwerror"
,
System
.
getProperty
(
"test.src"
,
"."
)
+
java
.
io
.
File
.
separatorChar
+
...
...
test/tools/javadoc/completionFailure/CompletionFailure.java
浏览文件 @
e7f84922
...
...
@@ -37,6 +37,7 @@ public class CompletionFailure extends Doclet
// run javadoc on package pkg
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"CompletionFailure"
,
CompletionFailure
.
class
.
getClassLoader
(),
new
String
[]{
"pkg"
})
!=
0
)
throw
new
Error
();
}
...
...
test/tools/javadoc/dupOk/DupOk.java
浏览文件 @
e7f84922
...
...
@@ -36,7 +36,7 @@ public class DupOk extends Doclet
public
static
void
main
(
String
[]
args
)
{
// run javadoc on package p
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"DupOk"
,
execute
(
"javadoc"
,
"DupOk"
,
DupOk
.
class
.
getClassLoader
(),
new
String
[]
{
"-sourcepath"
,
System
.
getProperty
(
"test.src"
,
"."
)
+
java
.
io
.
File
.
separatorChar
+
"sp1"
+
...
...
test/tools/javadoc/imports/MissingImport.java
浏览文件 @
e7f84922
...
...
@@ -41,6 +41,7 @@ public class MissingImport extends Doclet {
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"MissingImport"
,
MissingImport
.
class
.
getClassLoader
(),
new
String
[]
{
thisFile
})
!=
0
)
throw
new
Error
(
"Javadoc encountered warnings or errors."
);
}
...
...
test/tools/javadoc/lib/Tester.java
浏览文件 @
e7f84922
...
...
@@ -89,7 +89,9 @@ public class Tester {
public
void
run
()
throws
IOException
{
try
{
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
docletName
,
args
)
!=
0
)
{
docletName
,
getClass
().
getClassLoader
(),
args
)
!=
0
)
{
throw
new
Error
(
"Javadoc errors encountered."
);
}
System
.
out
.
println
(
"--> Output written to "
+
outputFile
);
...
...
test/tools/javadoc/nestedClass/NestedClass.java
浏览文件 @
e7f84922
...
...
@@ -39,7 +39,7 @@ public class NestedClass extends Doclet
public
static
void
main
(
String
[]
args
)
{
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"NestedClass"
,
execute
(
"javadoc"
,
"NestedClass"
,
NestedClass
.
class
.
getClassLoader
(),
new
String
[]
{
System
.
getProperty
(
"test.src"
,
"."
)
+
java
.
io
.
File
.
separatorChar
+
"NestedClass.java"
})
...
...
test/tools/javadoc/sourceOnly/p/SourceOnly.java
浏览文件 @
e7f84922
...
...
@@ -31,7 +31,7 @@ public class SourceOnly extends com.sun.javadoc.Doclet
public
static
void
main
(
String
[]
args
)
{
// run javadoc on package p
int
result
=
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"p.SourceOnly"
,
new
String
[]
{
"p"
});
execute
(
"javadoc"
,
"p.SourceOnly"
,
SourceOnly
.
class
.
getClassLoader
(),
new
String
[]
{
"p"
});
if
(
result
!=
0
)
throw
new
Error
();
}
...
...
test/tools/javadoc/sourceOption/SourceOption.java
浏览文件 @
e7f84922
...
...
@@ -36,6 +36,7 @@ public class SourceOption extends Doclet {
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"SourceOption"
,
SourceOption
.
class
.
getClassLoader
(),
new
String
[]
{
"-source"
,
"1.3"
,
"p"
})
!=
0
)
throw
new
Error
(
"Javadoc encountered warnings or errors."
);
}
...
...
test/tools/javadoc/subpackageIgnore/SubpackageIgnore.java
浏览文件 @
e7f84922
...
...
@@ -36,6 +36,7 @@ public class SubpackageIgnore extends Doclet {
if
(
com
.
sun
.
tools
.
javadoc
.
Main
.
execute
(
"javadoc"
,
"SubpackageIgnore"
,
SubpackageIgnore
.
class
.
getClassLoader
(),
new
String
[]
{
"-Xwerror"
,
"-sourcepath"
,
System
.
getProperty
(
"test.src"
,
"."
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录