Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
17c3050f
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看板
提交
17c3050f
编写于
10月 23, 2012
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8000741: refactor javadoc to use abstraction to handle relative paths
Reviewed-by: darcy
上级
f1f39f49
变更
56
展开全部
隐藏空白更改
内联
并排
Showing
56 changed file
with
725 addition
and
920 deletion
+725
-920
src/share/classes/com/sun/javadoc/SerialFieldTag.java
src/share/classes/com/sun/javadoc/SerialFieldTag.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
...m/sun/tools/doclets/formats/html/AbstractIndexWriter.java
+5
-19
src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java
...ools/doclets/formats/html/AbstractPackageIndexWriter.java
+5
-3
src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java
...om/sun/tools/doclets/formats/html/AbstractTreeWriter.java
+3
-26
src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java
...sun/tools/doclets/formats/html/AllClassesFrameWriter.java
+7
-14
src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
.../formats/html/AnnotationTypeOptionalMemberWriterImpl.java
+1
-1
src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
.../formats/html/AnnotationTypeRequiredMemberWriterImpl.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
.../tools/doclets/formats/html/AnnotationTypeWriterImpl.java
+6
-9
src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
...es/com/sun/tools/doclets/formats/html/ClassUseWriter.java
+13
-19
src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
...s/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
+5
-8
src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
...com/sun/tools/doclets/formats/html/ConfigurationImpl.java
+4
-10
src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
...ools/doclets/formats/html/ConstantsSummaryWriterImpl.java
+1
-1
src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
...sun/tools/doclets/formats/html/ConstructorWriterImpl.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java
.../sun/tools/doclets/formats/html/DeprecatedListWriter.java
+3
-3
src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
...un/tools/doclets/formats/html/EnumConstantWriterImpl.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
...s/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java
...com/sun/tools/doclets/formats/html/FrameOutputWriter.java
+9
-9
src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
...lasses/com/sun/tools/doclets/formats/html/HelpWriter.java
+11
-10
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
...lasses/com/sun/tools/doclets/formats/html/HtmlDoclet.java
+5
-12
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
.../com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
+82
-129
src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java
...s/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java
+5
-9
src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java
.../com/sun/tools/doclets/formats/html/MethodWriterImpl.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java
...sun/tools/doclets/formats/html/NestedClassWriterImpl.java
+2
-3
src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java
...om/sun/tools/doclets/formats/html/PackageFrameWriter.java
+3
-8
src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java
...n/tools/doclets/formats/html/PackageIndexFrameWriter.java
+5
-5
src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java
...om/sun/tools/doclets/formats/html/PackageIndexWriter.java
+3
-3
src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java
...com/sun/tools/doclets/formats/html/PackageTreeWriter.java
+11
-15
src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
.../com/sun/tools/doclets/formats/html/PackageUseWriter.java
+8
-10
src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java
...com/sun/tools/doclets/formats/html/PackageWriterImpl.java
+10
-27
src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java
.../tools/doclets/formats/html/SerializedFormWriterImpl.java
+2
-3
src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java
...com/sun/tools/doclets/formats/html/SingleIndexWriter.java
+3
-5
src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java
...sun/tools/doclets/formats/html/SourceToHTMLConverter.java
+17
-20
src/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter.java
.../com/sun/tools/doclets/formats/html/SplitIndexWriter.java
+11
-12
src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
...sun/tools/doclets/formats/html/SubWriterHolderWriter.java
+2
-9
src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
.../com/sun/tools/doclets/formats/html/TagletWriterImpl.java
+8
-6
src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java
...lasses/com/sun/tools/doclets/formats/html/TreeWriter.java
+3
-3
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
.../sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
+36
-23
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
...com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
+3
-17
src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
...om/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
+2
-2
src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java
.../tools/doclets/internal/toolkit/PackageSummaryWriter.java
+0
-7
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
...lets/internal/toolkit/builders/AnnotationTypeBuilder.java
+3
-5
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
...tools/doclets/internal/toolkit/builders/ClassBuilder.java
+3
-4
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
...lets/internal/toolkit/builders/PackageSummaryBuilder.java
+1
-3
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
...lets/internal/toolkit/builders/SerializedFormBuilder.java
+2
-0
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DirectoryManager.java
...tools/doclets/internal/toolkit/util/DirectoryManager.java
+0
-317
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocPath.java
.../com/sun/tools/doclets/internal/toolkit/util/DocPath.java
+188
-0
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocPaths.java
...com/sun/tools/doclets/internal/toolkit/util/DocPaths.java
+110
-0
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java
.../tools/doclets/internal/toolkit/util/DocletConstants.java
+8
-28
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java
...s/com/sun/tools/doclets/internal/toolkit/util/Extern.java
+5
-2
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java
...ools/doclets/internal/toolkit/util/PackageListWriter.java
+2
-3
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourcePath.java
...m/sun/tools/doclets/internal/toolkit/util/SourcePath.java
+4
-5
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
...ses/com/sun/tools/doclets/internal/toolkit/util/Util.java
+71
-62
src/share/classes/com/sun/tools/javadoc/SerializedForm.java
src/share/classes/com/sun/tools/javadoc/SerializedForm.java
+3
-0
test/com/sun/javadoc/testIndex/TestIndex.java
test/com/sun/javadoc/testIndex/TestIndex.java
+14
-14
test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
...adoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
+3
-3
test/com/sun/javadoc/testPackagePage/TestPackagePage.java
test/com/sun/javadoc/testPackagePage/TestPackagePage.java
+2
-2
未找到文件。
src/share/classes/com/sun/javadoc/SerialFieldTag.java
浏览文件 @
17c3050f
/*
/*
* Copyright (c) 1998, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -46,7 +46,7 @@ package com.sun.javadoc;
...
@@ -46,7 +46,7 @@ package com.sun.javadoc;
public
interface
SerialFieldTag
extends
Tag
,
Comparable
<
Object
>
{
public
interface
SerialFieldTag
extends
Tag
,
Comparable
<
Object
>
{
/**
/**
* Return the serial
zi
able field name.
* Return the serial
iz
able field name.
*/
*/
public
String
fieldName
();
public
String
fieldName
();
...
...
src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
浏览文件 @
17c3050f
...
@@ -56,32 +56,18 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
...
@@ -56,32 +56,18 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
protected
IndexBuilder
indexbuilder
;
protected
IndexBuilder
indexbuilder
;
/**
/**
* This constructor will be used by {@link SplitIndexWriter}. Initiali
s
es
* This constructor will be used by {@link SplitIndexWriter}. Initiali
z
es
* path to this file and relative path from this file.
* path to this file and relative path from this file.
*
*
* @param configuration The current configuration
* @param path Path to the file which is getting generated.
* @param path Path to the file which is getting generated.
* @param filename Name of the file which is getting genrated.
* @param relpath Relative path from this file to the current directory.
* @param indexbuilder Unicode based Index from {@link IndexBuilder}
* @param indexbuilder Unicode based Index from {@link IndexBuilder}
*/
*/
protected
AbstractIndexWriter
(
ConfigurationImpl
configuration
,
protected
AbstractIndexWriter
(
ConfigurationImpl
configuration
,
String
path
,
String
filename
,
DocPath
path
,
String
relpath
,
IndexBuilder
indexbuilder
)
IndexBuilder
indexbuilder
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
path
,
filename
,
relpath
);
super
(
configuration
,
path
);
this
.
indexbuilder
=
indexbuilder
;
}
/**
* This Constructor will be used by {@link SingleIndexWriter}.
*
* @param filename Name of the file which is getting genrated.
* @param indexbuilder Unicode based Index form {@link IndexBuilder}
*/
protected
AbstractIndexWriter
(
ConfigurationImpl
configuration
,
String
filename
,
IndexBuilder
indexbuilder
)
throws
IOException
{
super
(
configuration
,
filename
);
this
.
indexbuilder
=
indexbuilder
;
this
.
indexbuilder
=
indexbuilder
;
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java
浏览文件 @
17c3050f
...
@@ -27,9 +27,11 @@ package com.sun.tools.doclets.formats.html;
...
@@ -27,9 +27,11 @@ package com.sun.tools.doclets.formats.html;
import
java.io.*
;
import
java.io.*
;
import
java.util.*
;
import
java.util.*
;
import
com.sun.javadoc.*
;
import
com.sun.javadoc.*
;
import
com.sun.tools.doclets.formats.html.markup.*
;
import
com.sun.tools.doclets.formats.html.markup.*
;
import
com.sun.tools.doclets.internal.toolkit.*
;
import
com.sun.tools.doclets.internal.toolkit.*
;
import
com.sun.tools.doclets.internal.toolkit.util.DocPath
;
/**
/**
* Abstract class to generate the overview files in
* Abstract class to generate the overview files in
...
@@ -52,14 +54,14 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
...
@@ -52,14 +54,14 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
protected
PackageDoc
[]
packages
;
protected
PackageDoc
[]
packages
;
/**
/**
* Constructor. Also initiali
s
es the packages variable.
* Constructor. Also initiali
z
es the packages variable.
*
*
* @param configuration The current configuration
* @param filename Name of the package index file to be generated.
* @param filename Name of the package index file to be generated.
*/
*/
public
AbstractPackageIndexWriter
(
ConfigurationImpl
configuration
,
public
AbstractPackageIndexWriter
(
ConfigurationImpl
configuration
,
String
filename
)
throws
IOException
{
DocPath
filename
)
throws
IOException
{
super
(
configuration
,
filename
);
super
(
configuration
,
filename
);
this
.
relativepathNoSlash
=
"."
;
packages
=
configuration
.
packages
;
packages
=
configuration
.
packages
;
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java
浏览文件 @
17c3050f
...
@@ -56,45 +56,22 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
...
@@ -56,45 +56,22 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
private
static
final
String
LI_CIRCLE
=
"circle"
;
private
static
final
String
LI_CIRCLE
=
"circle"
;
/**
/**
* Constructor initi
lis
es classtree variable. This constructor will be used
* Constructor initi
aliz
es classtree variable. This constructor will be used
* while generating global tree file "overview-tree.html".
* while generating global tree file "overview-tree.html".
*
*
* @param configuration The current configuration
* @param filename File to be generated.
* @param filename File to be generated.
* @param classtree Tree built by {@link ClassTree}.
* @param classtree Tree built by {@link ClassTree}.
* @throws IOException
* @throws IOException
* @throws DocletAbortException
* @throws DocletAbortException
*/
*/
protected
AbstractTreeWriter
(
ConfigurationImpl
configuration
,
protected
AbstractTreeWriter
(
ConfigurationImpl
configuration
,
String
filename
,
ClassTree
classtree
)
DocPath
filename
,
ClassTree
classtree
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
filename
);
super
(
configuration
,
filename
);
this
.
classtree
=
classtree
;
this
.
classtree
=
classtree
;
}
}
/**
* Create appropriate directory for the package and also initilise the
* relative path from this generated file to the current or
* the destination directory. This constructor will be used while
* generating "package tree" file.
*
* @param path Directories in this path will be created if they are not
* already there.
* @param filename Name of the package tree file to be generated.
* @param classtree The tree built using {@link ClassTree}.
* for the package pkg.
* @param pkg PackageDoc for which tree file will be generated.
* @throws IOException
* @throws DocletAbortException
*/
protected
AbstractTreeWriter
(
ConfigurationImpl
configuration
,
String
path
,
String
filename
,
ClassTree
classtree
,
PackageDoc
pkg
)
throws
IOException
{
super
(
configuration
,
path
,
filename
,
DirectoryManager
.
getRelativePath
(
pkg
.
name
()));
this
.
classtree
=
classtree
;
}
/**
/**
* Add each level of the class tree. For each sub-class or
* Add each level of the class tree. For each sub-class or
* sub-interface indents the next level information.
* sub-interface indents the next level information.
...
...
src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java
浏览文件 @
17c3050f
...
@@ -50,16 +50,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
...
@@ -50,16 +50,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
*/
*/
public
class
AllClassesFrameWriter
extends
HtmlDocletWriter
{
public
class
AllClassesFrameWriter
extends
HtmlDocletWriter
{
/**
* The name of the output file with frames
*/
public
static
final
String
OUTPUT_FILE_NAME_FRAMES
=
"allclasses-frame.html"
;
/**
* The name of the output file without frames
*/
public
static
final
String
OUTPUT_FILE_NAME_NOFRAMES
=
"allclasses-noframe.html"
;
/**
/**
* Index of all the classes.
* Index of all the classes.
*/
*/
...
@@ -71,13 +61,16 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
...
@@ -71,13 +61,16 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
final
HtmlTree
BR
=
new
HtmlTree
(
HtmlTag
.
BR
);
final
HtmlTree
BR
=
new
HtmlTree
(
HtmlTag
.
BR
);
/**
/**
* Construct AllClassesFrameWriter object. Also initi
lis
es the indexbuilder
* Construct AllClassesFrameWriter object. Also initi
aliz
es the indexbuilder
* variable in this class.
* variable in this class.
* @param configuration The current configuration
* @param filename Path to the file which is getting generated.
* @param indexbuilder Unicode based Index from {@link IndexBuilder}
* @throws IOException
* @throws IOException
* @throws DocletAbortException
* @throws DocletAbortException
*/
*/
public
AllClassesFrameWriter
(
ConfigurationImpl
configuration
,
public
AllClassesFrameWriter
(
ConfigurationImpl
configuration
,
String
filename
,
IndexBuilder
indexbuilder
)
DocPath
filename
,
IndexBuilder
indexbuilder
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
filename
);
super
(
configuration
,
filename
);
this
.
indexbuilder
=
indexbuilder
;
this
.
indexbuilder
=
indexbuilder
;
...
@@ -94,13 +87,13 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
...
@@ -94,13 +87,13 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
public
static
void
generate
(
ConfigurationImpl
configuration
,
public
static
void
generate
(
ConfigurationImpl
configuration
,
IndexBuilder
indexbuilder
)
{
IndexBuilder
indexbuilder
)
{
AllClassesFrameWriter
allclassgen
;
AllClassesFrameWriter
allclassgen
;
String
filename
=
OUTPUT_FILE_NAME_FRAMES
;
DocPath
filename
=
DocPaths
.
ALLCLASSES_FRAME
;
try
{
try
{
allclassgen
=
new
AllClassesFrameWriter
(
configuration
,
allclassgen
=
new
AllClassesFrameWriter
(
configuration
,
filename
,
indexbuilder
);
filename
,
indexbuilder
);
allclassgen
.
buildAllClassesFile
(
true
);
allclassgen
.
buildAllClassesFile
(
true
);
allclassgen
.
close
();
allclassgen
.
close
();
filename
=
OUTPUT_FILE_NAME_NOFRAMES
;
filename
=
DocPaths
.
ALLCLASSES_NOFRAME
;
allclassgen
=
new
AllClassesFrameWriter
(
configuration
,
allclassgen
=
new
AllClassesFrameWriter
(
configuration
,
filename
,
indexbuilder
);
filename
,
indexbuilder
);
allclassgen
.
buildAllClassesFile
(
false
);
allclassgen
.
buildAllClassesFile
(
false
);
...
...
src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
浏览文件 @
17c3050f
...
@@ -141,7 +141,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
...
@@ -141,7 +141,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
*/
*/
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
if
(
link
)
{
if
(
link
)
{
return
writer
.
getHyperLink
(
"
"
,
"
annotation_type_optional_element_summary"
,
return
writer
.
getHyperLink
(
"annotation_type_optional_element_summary"
,
writer
.
getResource
(
"doclet.navAnnotationTypeOptionalMember"
));
writer
.
getResource
(
"doclet.navAnnotationTypeOptionalMember"
));
}
else
{
}
else
{
return
writer
.
getResource
(
"doclet.navAnnotationTypeOptionalMember"
);
return
writer
.
getResource
(
"doclet.navAnnotationTypeOptionalMember"
);
...
...
src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
浏览文件 @
17c3050f
...
@@ -260,7 +260,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
...
@@ -260,7 +260,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
*/
*/
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
if
(
link
)
{
if
(
link
)
{
return
writer
.
getHyperLink
(
"
"
,
"
annotation_type_required_element_summary"
,
return
writer
.
getHyperLink
(
"annotation_type_required_element_summary"
,
writer
.
getResource
(
"doclet.navAnnotationTypeRequiredMember"
));
writer
.
getResource
(
"doclet.navAnnotationTypeRequiredMember"
));
}
else
{
}
else
{
return
writer
.
getResource
(
"doclet.navAnnotationTypeRequiredMember"
);
return
writer
.
getResource
(
"doclet.navAnnotationTypeRequiredMember"
);
...
@@ -272,7 +272,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
...
@@ -272,7 +272,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
*/
*/
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
if
(
link
)
{
if
(
link
)
{
liNav
.
addContent
(
writer
.
getHyperLink
(
"
"
,
"
annotation_type_element_detail"
,
liNav
.
addContent
(
writer
.
getHyperLink
(
"annotation_type_element_detail"
,
writer
.
getResource
(
"doclet.navAnnotationTypeMember"
)));
writer
.
getResource
(
"doclet.navAnnotationTypeMember"
)));
}
else
{
}
else
{
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navAnnotationTypeMember"
));
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navAnnotationTypeMember"
));
...
...
src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
浏览文件 @
17c3050f
...
@@ -65,13 +65,10 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
...
@@ -65,13 +65,10 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
* @param prevType the previous class that was documented.
* @param prevType the previous class that was documented.
* @param nextType the next class being documented.
* @param nextType the next class being documented.
*/
*/
public
AnnotationTypeWriterImpl
(
AnnotationTypeDoc
annotationType
,
public
AnnotationTypeWriterImpl
(
AnnotationTypeDoc
annotationType
,
Type
prevType
,
Type
nextType
)
Type
prevType
,
Type
nextType
)
throws
Exception
{
throws
Exception
{
super
(
ConfigurationImpl
.
getInstance
(),
super
(
ConfigurationImpl
.
getInstance
(),
DocPath
.
forClass
(
annotationType
));
DirectoryManager
.
getDirectoryPath
(
annotationType
.
containingPackage
()),
annotationType
.
name
()
+
".html"
,
DirectoryManager
.
getRelativePath
(
annotationType
.
containingPackage
().
name
()));
this
.
annotationType
=
annotationType
;
this
.
annotationType
=
annotationType
;
configuration
.
currentcd
=
annotationType
.
asClassDoc
();
configuration
.
currentcd
=
annotationType
.
asClassDoc
();
this
.
prev
=
prevType
;
this
.
prev
=
prevType
;
...
@@ -84,7 +81,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
...
@@ -84,7 +81,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
* @return a content tree for the package link
* @return a content tree for the package link
*/
*/
protected
Content
getNavLinkPackage
()
{
protected
Content
getNavLinkPackage
()
{
Content
linkContent
=
getHyperLink
(
"package-summary.html"
,
""
,
Content
linkContent
=
getHyperLink
(
DocPaths
.
PACKAGE_SUMMARY
,
""
,
packageLabel
);
packageLabel
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
return
li
;
return
li
;
...
@@ -106,7 +103,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
...
@@ -106,7 +103,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
* @return a content tree for the class use link
* @return a content tree for the class use link
*/
*/
protected
Content
getNavLinkClassUse
()
{
protected
Content
getNavLinkClassUse
()
{
Content
linkContent
=
getHyperLink
(
"class-use/"
+
filename
,
""
,
useLabel
);
Content
linkContent
=
getHyperLink
(
DocPaths
.
CLASS_USE
.
resolve
(
filename
)
,
""
,
useLabel
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
return
li
;
return
li
;
}
}
...
@@ -289,7 +286,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
...
@@ -289,7 +286,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
* {@inheritDoc}
* {@inheritDoc}
*/
*/
protected
Content
getNavLinkTree
()
{
protected
Content
getNavLinkTree
()
{
Content
treeLinkContent
=
getHyperLink
(
"package-tree.html"
,
Content
treeLinkContent
=
getHyperLink
(
DocPaths
.
PACKAGE_TREE
,
""
,
treeLabel
,
""
,
""
);
""
,
treeLabel
,
""
,
""
);
Content
li
=
HtmlTree
.
LI
(
treeLinkContent
);
Content
li
=
HtmlTree
.
LI
(
treeLinkContent
);
return
li
;
return
li
;
...
...
src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
浏览文件 @
17c3050f
...
@@ -82,7 +82,6 @@ public class ClassUseWriter extends SubWriterHolderWriter {
...
@@ -82,7 +82,6 @@ public class ClassUseWriter extends SubWriterHolderWriter {
final
String
methodUseTableSummary
;
final
String
methodUseTableSummary
;
final
String
constructorUseTableSummary
;
final
String
constructorUseTableSummary
;
/**
/**
* Constructor.
* Constructor.
*
*
...
@@ -91,10 +90,9 @@ public class ClassUseWriter extends SubWriterHolderWriter {
...
@@ -91,10 +90,9 @@ public class ClassUseWriter extends SubWriterHolderWriter {
* @throws DocletAbortException
* @throws DocletAbortException
*/
*/
public
ClassUseWriter
(
ConfigurationImpl
configuration
,
public
ClassUseWriter
(
ConfigurationImpl
configuration
,
ClassUseMapper
mapper
,
String
path
,
ClassUseMapper
mapper
,
DocPath
filename
,
String
filename
,
String
relpath
,
ClassDoc
classdoc
)
throws
IOException
{
ClassDoc
classdoc
)
throws
IOException
{
super
(
configuration
,
path
,
filename
,
relpath
);
super
(
configuration
,
filename
);
this
.
classdoc
=
classdoc
;
this
.
classdoc
=
classdoc
;
if
(
mapper
.
classToPackageAnnotations
.
containsKey
(
classdoc
.
qualifiedName
()))
if
(
mapper
.
classToPackageAnnotations
.
containsKey
(
classdoc
.
qualifiedName
()))
pkgToPackageAnnotations
=
new
HashSet
<
PackageDoc
>(
mapper
.
classToPackageAnnotations
.
get
(
classdoc
.
qualifiedName
()));
pkgToPackageAnnotations
=
new
HashSet
<
PackageDoc
>(
mapper
.
classToPackageAnnotations
.
get
(
classdoc
.
qualifiedName
()));
...
@@ -199,23 +197,19 @@ public class ClassUseWriter extends SubWriterHolderWriter {
...
@@ -199,23 +197,19 @@ public class ClassUseWriter extends SubWriterHolderWriter {
public
static
void
generate
(
ConfigurationImpl
configuration
,
public
static
void
generate
(
ConfigurationImpl
configuration
,
ClassUseMapper
mapper
,
ClassDoc
classdoc
)
{
ClassUseMapper
mapper
,
ClassDoc
classdoc
)
{
ClassUseWriter
clsgen
;
ClassUseWriter
clsgen
;
String
path
=
DirectoryManager
.
getDirectoryPath
(
classdoc
.
DocPath
path
=
DocPath
.
forPackage
(
classdoc
)
containingPackage
());
.
resolve
(
DocPaths
.
CLASS_USE
)
path
+=
"class-use"
+
DirectoryManager
.
URL_FILE_SEPARATOR
;
.
resolve
(
DocPath
.
forName
(
classdoc
));
String
filename
=
classdoc
.
name
()
+
".html"
;
String
pkgname
=
classdoc
.
containingPackage
().
name
();
pkgname
+=
(
pkgname
.
length
()
>
0
)?
".class-use"
:
"class-use"
;
String
relpath
=
DirectoryManager
.
getRelativePath
(
pkgname
);
try
{
try
{
clsgen
=
new
ClassUseWriter
(
configuration
,
clsgen
=
new
ClassUseWriter
(
configuration
,
mapper
,
path
,
filename
,
mapper
,
path
,
relpath
,
classdoc
);
classdoc
);
clsgen
.
generateClassUseFile
();
clsgen
.
generateClassUseFile
();
clsgen
.
close
();
clsgen
.
close
();
}
catch
(
IOException
exc
)
{
}
catch
(
IOException
exc
)
{
configuration
.
standardmessage
.
configuration
.
standardmessage
.
error
(
"doclet.exception_encountered"
,
error
(
"doclet.exception_encountered"
,
exc
.
toString
(),
filename
);
exc
.
toString
(),
path
.
getPath
()
);
throw
new
DocletAbortException
();
throw
new
DocletAbortException
();
}
}
}
}
...
@@ -359,7 +353,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
...
@@ -359,7 +353,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
*/
*/
protected
void
addPackageUse
(
PackageDoc
pkg
,
Content
contentTree
)
throws
IOException
{
protected
void
addPackageUse
(
PackageDoc
pkg
,
Content
contentTree
)
throws
IOException
{
Content
tdFirst
=
HtmlTree
.
TD
(
HtmlStyle
.
colFirst
,
Content
tdFirst
=
HtmlTree
.
TD
(
HtmlStyle
.
colFirst
,
getHyperLink
(
""
,
pkg
.
name
(),
new
StringContent
(
Util
.
getPackageName
(
pkg
))));
getHyperLink
(
pkg
.
name
(),
new
StringContent
(
Util
.
getPackageName
(
pkg
))));
contentTree
.
addContent
(
tdFirst
);
contentTree
.
addContent
(
tdFirst
);
HtmlTree
tdLast
=
new
HtmlTree
(
HtmlTag
.
TD
);
HtmlTree
tdLast
=
new
HtmlTree
(
HtmlTag
.
TD
);
tdLast
.
addStyle
(
HtmlStyle
.
colLast
);
tdLast
.
addStyle
(
HtmlStyle
.
colLast
);
...
@@ -470,8 +464,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
...
@@ -470,8 +464,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
* @return a content tree for the package link
* @return a content tree for the package link
*/
*/
protected
Content
getNavLinkPackage
()
{
protected
Content
getNavLinkPackage
()
{
Content
linkContent
=
getHyperLink
(
"../package-summary.html"
,
""
,
Content
linkContent
=
packageLabel
);
getHyperLink
(
DocPath
.
parent
.
resolve
(
DocPaths
.
PACKAGE_SUMMARY
),
""
,
packageLabel
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
return
li
;
return
li
;
}
}
...
@@ -506,8 +500,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
...
@@ -506,8 +500,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
*/
*/
protected
Content
getNavLinkTree
()
{
protected
Content
getNavLinkTree
()
{
Content
linkContent
=
classdoc
.
containingPackage
().
isIncluded
()
?
Content
linkContent
=
classdoc
.
containingPackage
().
isIncluded
()
?
getHyperLink
(
"../package-tree.html"
,
""
,
treeLabel
)
:
getHyperLink
(
DocPath
.
parent
.
resolve
(
DocPaths
.
PACKAGE_TREE
)
,
""
,
treeLabel
)
:
getHyperLink
(
relativePath
+
"overview-tree.html"
,
""
,
treeLabel
);
getHyperLink
(
pathToRoot
.
resolve
(
DocPaths
.
OVERVIEW_TREE
)
,
""
,
treeLabel
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
return
li
;
return
li
;
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
浏览文件 @
17c3050f
...
@@ -72,11 +72,8 @@ public class ClassWriterImpl extends SubWriterHolderWriter
...
@@ -72,11 +72,8 @@ public class ClassWriterImpl extends SubWriterHolderWriter
*/
*/
public
ClassWriterImpl
(
ClassDoc
classDoc
,
public
ClassWriterImpl
(
ClassDoc
classDoc
,
ClassDoc
prevClass
,
ClassDoc
nextClass
,
ClassTree
classTree
)
ClassDoc
prevClass
,
ClassDoc
nextClass
,
ClassTree
classTree
)
throws
Exception
{
throws
Exception
{
super
(
ConfigurationImpl
.
getInstance
(),
super
(
ConfigurationImpl
.
getInstance
(),
DocPath
.
forClass
(
classDoc
));
DirectoryManager
.
getDirectoryPath
(
classDoc
.
containingPackage
()),
classDoc
.
name
()
+
".html"
,
DirectoryManager
.
getRelativePath
(
classDoc
.
containingPackage
().
name
()));
this
.
classDoc
=
classDoc
;
this
.
classDoc
=
classDoc
;
configuration
.
currentcd
=
classDoc
;
configuration
.
currentcd
=
classDoc
;
this
.
classtree
=
classTree
;
this
.
classtree
=
classTree
;
...
@@ -90,7 +87,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
...
@@ -90,7 +87,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
* @return a content tree for the package link
* @return a content tree for the package link
*/
*/
protected
Content
getNavLinkPackage
()
{
protected
Content
getNavLinkPackage
()
{
Content
linkContent
=
getHyperLink
(
"package-summary.html"
,
""
,
Content
linkContent
=
getHyperLink
(
DocPaths
.
PACKAGE_SUMMARY
,
""
,
packageLabel
);
packageLabel
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
return
li
;
return
li
;
...
@@ -112,7 +109,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
...
@@ -112,7 +109,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
* @return a content tree for the class use link
* @return a content tree for the class use link
*/
*/
protected
Content
getNavLinkClassUse
()
{
protected
Content
getNavLinkClassUse
()
{
Content
linkContent
=
getHyperLink
(
"class-use/"
+
filename
,
""
,
useLabel
);
Content
linkContent
=
getHyperLink
(
DocPaths
.
CLASS_USE
.
resolve
(
filename
)
,
""
,
useLabel
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
return
li
;
return
li
;
}
}
...
@@ -567,7 +564,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
...
@@ -567,7 +564,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
* {@inheritDoc}
* {@inheritDoc}
*/
*/
protected
Content
getNavLinkTree
()
{
protected
Content
getNavLinkTree
()
{
Content
treeLinkContent
=
getHyperLink
(
"package-tree.html"
,
Content
treeLinkContent
=
getHyperLink
(
DocPaths
.
PACKAGE_TREE
,
""
,
treeLabel
,
""
,
""
);
""
,
treeLabel
,
""
,
""
);
Content
li
=
HtmlTree
.
LI
(
treeLinkContent
);
Content
li
=
HtmlTree
.
LI
(
treeLinkContent
);
return
li
;
return
li
;
...
...
src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
浏览文件 @
17c3050f
...
@@ -61,11 +61,6 @@ public class ConfigurationImpl extends Configuration {
...
@@ -61,11 +61,6 @@ public class ConfigurationImpl extends Configuration {
*/
*/
public
static
final
String
BUILD_DATE
=
System
.
getProperty
(
"java.version"
);
public
static
final
String
BUILD_DATE
=
System
.
getProperty
(
"java.version"
);
/**
* The name of the constant values file.
*/
public
static
final
String
CONSTANTS_FILE_NAME
=
"constant-values.html"
;
/**
/**
* Argument for command line option "-header".
* Argument for command line option "-header".
*/
*/
...
@@ -179,7 +174,7 @@ public class ConfigurationImpl extends Configuration {
...
@@ -179,7 +174,7 @@ public class ConfigurationImpl extends Configuration {
* First file to appear in the right-hand frame in the generated
* First file to appear in the right-hand frame in the generated
* documentation.
* documentation.
*/
*/
public
String
topFile
=
""
;
public
DocPath
topFile
=
DocPath
.
empty
;
/**
/**
* The classdoc for the class file getting generated.
* The classdoc for the class file getting generated.
...
@@ -447,18 +442,17 @@ public class ConfigurationImpl extends Configuration {
...
@@ -447,18 +442,17 @@ public class ConfigurationImpl extends Configuration {
return
;
return
;
}
}
if
(
createoverview
)
{
if
(
createoverview
)
{
topFile
=
"overview-summary.html"
;
topFile
=
DocPaths
.
OVERVIEW_SUMMARY
;
}
else
{
}
else
{
if
(
packages
.
length
==
1
&&
packages
[
0
].
name
().
equals
(
""
))
{
if
(
packages
.
length
==
1
&&
packages
[
0
].
name
().
equals
(
""
))
{
if
(
root
.
classes
().
length
>
0
)
{
if
(
root
.
classes
().
length
>
0
)
{
ClassDoc
[]
classarr
=
root
.
classes
();
ClassDoc
[]
classarr
=
root
.
classes
();
Arrays
.
sort
(
classarr
);
Arrays
.
sort
(
classarr
);
ClassDoc
cd
=
getValidClass
(
classarr
);
ClassDoc
cd
=
getValidClass
(
classarr
);
topFile
=
D
irectoryManager
.
getPathTo
Class
(
cd
);
topFile
=
D
ocPath
.
for
Class
(
cd
);
}
}
}
else
{
}
else
{
topFile
=
DirectoryManager
.
getPathToPackage
(
packages
[
0
],
topFile
=
DocPath
.
forPackage
(
packages
[
0
]).
resolve
(
DocPaths
.
PACKAGE_SUMMARY
);
"package-summary.html"
);
}
}
}
}
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
浏览文件 @
17c3050f
...
@@ -69,7 +69,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
...
@@ -69,7 +69,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
*/
*/
public
ConstantsSummaryWriterImpl
(
ConfigurationImpl
configuration
)
public
ConstantsSummaryWriterImpl
(
ConfigurationImpl
configuration
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
ConfigurationImpl
.
CONSTANTS_FILE_NAME
);
super
(
configuration
,
DocPaths
.
CONSTANT_VALUES
);
this
.
configuration
=
configuration
;
this
.
configuration
=
configuration
;
constantsTableSummary
=
configuration
.
getText
(
"doclet.Constants_Table_Summary"
,
constantsTableSummary
=
configuration
.
getText
(
"doclet.Constants_Table_Summary"
,
configuration
.
getText
(
"doclet.Constants_Summary"
));
configuration
.
getText
(
"doclet.Constants_Summary"
));
...
...
src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
浏览文件 @
17c3050f
...
@@ -280,7 +280,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
...
@@ -280,7 +280,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
*/
*/
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
if
(
link
)
{
if
(
link
)
{
return
writer
.
getHyperLink
(
"
"
,
"
constructor_summary"
,
return
writer
.
getHyperLink
(
"constructor_summary"
,
writer
.
getResource
(
"doclet.navConstructor"
));
writer
.
getResource
(
"doclet.navConstructor"
));
}
else
{
}
else
{
return
writer
.
getResource
(
"doclet.navConstructor"
);
return
writer
.
getResource
(
"doclet.navConstructor"
);
...
@@ -292,7 +292,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
...
@@ -292,7 +292,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
*/
*/
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
if
(
link
)
{
if
(
link
)
{
liNav
.
addContent
(
writer
.
getHyperLink
(
"
"
,
"
constructor_detail"
,
liNav
.
addContent
(
writer
.
getHyperLink
(
"constructor_detail"
,
writer
.
getResource
(
"doclet.navConstructor"
)));
writer
.
getResource
(
"doclet.navConstructor"
)));
}
else
{
}
else
{
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navConstructor"
));
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navConstructor"
));
...
...
src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java
浏览文件 @
17c3050f
...
@@ -95,7 +95,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
...
@@ -95,7 +95,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
* @param filename the file to be generated.
* @param filename the file to be generated.
*/
*/
public
DeprecatedListWriter
(
ConfigurationImpl
configuration
,
public
DeprecatedListWriter
(
ConfigurationImpl
configuration
,
String
filename
)
throws
IOException
{
DocPath
filename
)
throws
IOException
{
super
(
configuration
,
filename
);
super
(
configuration
,
filename
);
this
.
configuration
=
configuration
;
this
.
configuration
=
configuration
;
NestedClassWriterImpl
classW
=
new
NestedClassWriterImpl
(
this
);
NestedClassWriterImpl
classW
=
new
NestedClassWriterImpl
(
this
);
...
@@ -116,7 +116,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
...
@@ -116,7 +116,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
* @param configuration the current configuration of the doclet.
* @param configuration the current configuration of the doclet.
*/
*/
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
String
filename
=
"deprecated-list.html"
;
DocPath
filename
=
DocPaths
.
DEPRECATED_LIST
;
try
{
try
{
DeprecatedListWriter
depr
=
DeprecatedListWriter
depr
=
new
DeprecatedListWriter
(
configuration
,
filename
);
new
DeprecatedListWriter
(
configuration
,
filename
);
...
@@ -180,7 +180,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
...
@@ -180,7 +180,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
private
void
addIndexLink
(
DeprecatedAPIListBuilder
builder
,
private
void
addIndexLink
(
DeprecatedAPIListBuilder
builder
,
int
type
,
Content
contentTree
)
{
int
type
,
Content
contentTree
)
{
if
(
builder
.
hasDocumentation
(
type
))
{
if
(
builder
.
hasDocumentation
(
type
))
{
Content
li
=
HtmlTree
.
LI
(
getHyperLink
(
"#"
+
ANCHORS
[
type
],
Content
li
=
HtmlTree
.
LI
(
getHyperLink
(
ANCHORS
[
type
],
getResource
(
HEADING_KEYS
[
type
])));
getResource
(
HEADING_KEYS
[
type
])));
contentTree
.
addContent
(
li
);
contentTree
.
addContent
(
li
);
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
浏览文件 @
17c3050f
...
@@ -263,7 +263,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
...
@@ -263,7 +263,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
*/
*/
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
if
(
link
)
{
if
(
link
)
{
return
writer
.
getHyperLink
(
""
,
(
cd
==
null
)?
return
writer
.
getHyperLink
((
cd
==
null
)?
"enum_constant_summary"
:
"enum_constant_summary"
:
"enum_constants_inherited_from_class_"
+
"enum_constants_inherited_from_class_"
+
configuration
().
getClassName
(
cd
),
configuration
().
getClassName
(
cd
),
...
@@ -278,7 +278,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
...
@@ -278,7 +278,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
*/
*/
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
if
(
link
)
{
if
(
link
)
{
liNav
.
addContent
(
writer
.
getHyperLink
(
"
"
,
"
enum_constant_detail"
,
liNav
.
addContent
(
writer
.
getHyperLink
(
"enum_constant_detail"
,
writer
.
getResource
(
"doclet.navEnum"
)));
writer
.
getResource
(
"doclet.navEnum"
)));
}
else
{
}
else
{
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navEnum"
));
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navEnum"
));
...
...
src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
浏览文件 @
17c3050f
...
@@ -293,7 +293,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
...
@@ -293,7 +293,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
*/
*/
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
if
(
link
)
{
if
(
link
)
{
return
writer
.
getHyperLink
(
""
,
(
cd
==
null
)?
return
writer
.
getHyperLink
((
cd
==
null
)?
"field_summary"
:
"field_summary"
:
"fields_inherited_from_class_"
+
"fields_inherited_from_class_"
+
configuration
().
getClassName
(
cd
),
configuration
().
getClassName
(
cd
),
...
@@ -308,7 +308,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
...
@@ -308,7 +308,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
*/
*/
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
if
(
link
)
{
if
(
link
)
{
liNav
.
addContent
(
writer
.
getHyperLink
(
"
"
,
"
field_detail"
,
liNav
.
addContent
(
writer
.
getHyperLink
(
"field_detail"
,
writer
.
getResource
(
"doclet.navField"
)));
writer
.
getResource
(
"doclet.navField"
)));
}
else
{
}
else
{
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navField"
));
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navField"
));
...
...
src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java
浏览文件 @
17c3050f
...
@@ -63,7 +63,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
...
@@ -63,7 +63,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
* @param filename File to be generated.
* @param filename File to be generated.
*/
*/
public
FrameOutputWriter
(
ConfigurationImpl
configuration
,
public
FrameOutputWriter
(
ConfigurationImpl
configuration
,
String
filename
)
throws
IOException
{
DocPath
filename
)
throws
IOException
{
super
(
configuration
,
filename
);
super
(
configuration
,
filename
);
noOfPackages
=
configuration
.
packages
.
length
;
noOfPackages
=
configuration
.
packages
.
length
;
}
}
...
@@ -77,9 +77,9 @@ public class FrameOutputWriter extends HtmlDocletWriter {
...
@@ -77,9 +77,9 @@ public class FrameOutputWriter extends HtmlDocletWriter {
*/
*/
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
FrameOutputWriter
framegen
;
FrameOutputWriter
framegen
;
String
filename
=
""
;
DocPath
filename
=
DocPath
.
empty
;
try
{
try
{
filename
=
"index.html"
;
filename
=
DocPaths
.
INDEX
;
framegen
=
new
FrameOutputWriter
(
configuration
,
filename
);
framegen
=
new
FrameOutputWriter
(
configuration
,
filename
);
framegen
.
generateFrameFile
();
framegen
.
generateFrameFile
();
framegen
.
close
();
framegen
.
close
();
...
@@ -92,7 +92,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
...
@@ -92,7 +92,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
}
}
/**
/**
* Generate the contants in the "index.html" file. Print the frame details
* Generate the con
s
tants in the "index.html" file. Print the frame details
* as well as warning if browser is not supporting the Html frames.
* as well as warning if browser is not supporting the Html frames.
*/
*/
protected
void
generateFrameFile
()
throws
IOException
{
protected
void
generateFrameFile
()
throws
IOException
{
...
@@ -155,8 +155,8 @@ public class FrameOutputWriter extends HtmlDocletWriter {
...
@@ -155,8 +155,8 @@ public class FrameOutputWriter extends HtmlDocletWriter {
* @param contentTree the content tree to which the information will be added
* @param contentTree the content tree to which the information will be added
*/
*/
private
void
addAllPackagesFrameTag
(
Content
contentTree
)
{
private
void
addAllPackagesFrameTag
(
Content
contentTree
)
{
HtmlTree
frame
=
HtmlTree
.
FRAME
(
"overview-frame.html"
,
"packageListFrame"
,
HtmlTree
frame
=
HtmlTree
.
FRAME
(
DocPaths
.
OVERVIEW_FRAME
.
getPath
()
,
configuration
.
getText
(
"doclet.All_Packages"
));
"packageListFrame"
,
configuration
.
getText
(
"doclet.All_Packages"
));
contentTree
.
addContent
(
frame
);
contentTree
.
addContent
(
frame
);
}
}
...
@@ -166,8 +166,8 @@ public class FrameOutputWriter extends HtmlDocletWriter {
...
@@ -166,8 +166,8 @@ public class FrameOutputWriter extends HtmlDocletWriter {
* @param contentTree the content tree to which the information will be added
* @param contentTree the content tree to which the information will be added
*/
*/
private
void
addAllClassesFrameTag
(
Content
contentTree
)
{
private
void
addAllClassesFrameTag
(
Content
contentTree
)
{
HtmlTree
frame
=
HtmlTree
.
FRAME
(
"allclasses-frame.html"
,
"packageFrame"
,
HtmlTree
frame
=
HtmlTree
.
FRAME
(
DocPaths
.
ALLCLASSES_FRAME
.
getPath
()
,
configuration
.
getText
(
"doclet.All_classes_and_interfaces"
));
"packageFrame"
,
configuration
.
getText
(
"doclet.All_classes_and_interfaces"
));
contentTree
.
addContent
(
frame
);
contentTree
.
addContent
(
frame
);
}
}
...
@@ -177,7 +177,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
...
@@ -177,7 +177,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
* @param contentTree the content tree to which the information will be added
* @param contentTree the content tree to which the information will be added
*/
*/
private
void
addClassFrameTag
(
Content
contentTree
)
{
private
void
addClassFrameTag
(
Content
contentTree
)
{
HtmlTree
frame
=
HtmlTree
.
FRAME
(
configuration
.
topFile
,
"classFrame"
,
HtmlTree
frame
=
HtmlTree
.
FRAME
(
configuration
.
topFile
.
getPath
()
,
"classFrame"
,
configuration
.
getText
(
"doclet.Package_class_and_interface_descriptions"
),
configuration
.
getText
(
"doclet.Package_class_and_interface_descriptions"
),
SCROLL_YES
);
SCROLL_YES
);
contentTree
.
addContent
(
frame
);
contentTree
.
addContent
(
frame
);
...
...
src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
浏览文件 @
17c3050f
...
@@ -49,7 +49,7 @@ public class HelpWriter extends HtmlDocletWriter {
...
@@ -49,7 +49,7 @@ public class HelpWriter extends HtmlDocletWriter {
* @param filename File to be generated.
* @param filename File to be generated.
*/
*/
public
HelpWriter
(
ConfigurationImpl
configuration
,
public
HelpWriter
(
ConfigurationImpl
configuration
,
String
filename
)
throws
IOException
{
DocPath
filename
)
throws
IOException
{
super
(
configuration
,
filename
);
super
(
configuration
,
filename
);
}
}
...
@@ -62,9 +62,9 @@ public class HelpWriter extends HtmlDocletWriter {
...
@@ -62,9 +62,9 @@ public class HelpWriter extends HtmlDocletWriter {
*/
*/
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
HelpWriter
helpgen
;
HelpWriter
helpgen
;
String
filename
=
""
;
DocPath
filename
=
DocPath
.
empty
;
try
{
try
{
filename
=
"help-doc.html"
;
filename
=
DocPaths
.
HELP_DOC
;
helpgen
=
new
HelpWriter
(
configuration
,
filename
);
helpgen
=
new
HelpWriter
(
configuration
,
filename
);
helpgen
.
generateHelpFile
();
helpgen
.
generateHelpFile
();
helpgen
.
close
();
helpgen
.
close
();
...
@@ -113,7 +113,7 @@ public class HelpWriter extends HtmlDocletWriter {
...
@@ -113,7 +113,7 @@ public class HelpWriter extends HtmlDocletWriter {
getResource
(
"doclet.Overview"
));
getResource
(
"doclet.Overview"
));
Content
liOverview
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
overviewHeading
);
Content
liOverview
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
overviewHeading
);
Content
line3
=
getResource
(
"doclet.Help_line_3"
,
Content
line3
=
getResource
(
"doclet.Help_line_3"
,
getHyperLinkString
(
"overview-summary.html"
,
getHyperLinkString
(
DocPaths
.
OVERVIEW_SUMMARY
,
configuration
.
getText
(
"doclet.Overview"
)));
configuration
.
getText
(
"doclet.Overview"
)));
Content
overviewPara
=
HtmlTree
.
P
(
line3
);
Content
overviewPara
=
HtmlTree
.
P
(
line3
);
liOverview
.
addContent
(
overviewPara
);
liOverview
.
addContent
(
overviewPara
);
...
@@ -234,7 +234,7 @@ public class HelpWriter extends HtmlDocletWriter {
...
@@ -234,7 +234,7 @@ public class HelpWriter extends HtmlDocletWriter {
getResource
(
"doclet.Help_line_16"
));
getResource
(
"doclet.Help_line_16"
));
Content
liTree
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
treeHead
);
Content
liTree
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
treeHead
);
Content
line17
=
getResource
(
"doclet.Help_line_17_with_tree_link"
,
Content
line17
=
getResource
(
"doclet.Help_line_17_with_tree_link"
,
getHyperLinkString
(
"overview-tree.html"
,
getHyperLinkString
(
DocPaths
.
OVERVIEW_TREE
,
configuration
.
getText
(
"doclet.Class_Hierarchy"
)));
configuration
.
getText
(
"doclet.Class_Hierarchy"
)));
Content
treePara
=
HtmlTree
.
P
(
line17
);
Content
treePara
=
HtmlTree
.
P
(
line17
);
liTree
.
addContent
(
treePara
);
liTree
.
addContent
(
treePara
);
...
@@ -252,7 +252,7 @@ public class HelpWriter extends HtmlDocletWriter {
...
@@ -252,7 +252,7 @@ public class HelpWriter extends HtmlDocletWriter {
getResource
(
"doclet.Deprecated_API"
));
getResource
(
"doclet.Deprecated_API"
));
Content
liDeprecated
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
dHead
);
Content
liDeprecated
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
dHead
);
Content
line20
=
getResource
(
"doclet.Help_line_20_with_deprecated_api_link"
,
Content
line20
=
getResource
(
"doclet.Help_line_20_with_deprecated_api_link"
,
getHyperLinkString
(
"deprecated-list.html"
,
getHyperLinkString
(
DocPaths
.
DEPRECATED_LIST
,
configuration
.
getText
(
"doclet.Deprecated_API"
)));
configuration
.
getText
(
"doclet.Deprecated_API"
)));
Content
dPara
=
HtmlTree
.
P
(
line20
);
Content
dPara
=
HtmlTree
.
P
(
line20
);
liDeprecated
.
addContent
(
dPara
);
liDeprecated
.
addContent
(
dPara
);
...
@@ -261,10 +261,10 @@ public class HelpWriter extends HtmlDocletWriter {
...
@@ -261,10 +261,10 @@ public class HelpWriter extends HtmlDocletWriter {
if
(
configuration
.
createindex
)
{
if
(
configuration
.
createindex
)
{
String
indexlink
;
String
indexlink
;
if
(
configuration
.
splitindex
)
{
if
(
configuration
.
splitindex
)
{
indexlink
=
getHyperLinkString
(
"index-files/index-1.html"
,
indexlink
=
getHyperLinkString
(
DocPaths
.
INDEX_FILES
.
resolve
(
DocPaths
.
indexN
(
1
))
,
configuration
.
getText
(
"doclet.Index"
));
configuration
.
getText
(
"doclet.Index"
));
}
else
{
}
else
{
indexlink
=
getHyperLinkString
(
"index-all.html"
,
indexlink
=
getHyperLinkString
(
DocPaths
.
INDEX_ALL
,
configuration
.
getText
(
"doclet.Index"
));
configuration
.
getText
(
"doclet.Index"
));
}
}
Content
indexHead
=
HtmlTree
.
HEADING
(
HtmlConstants
.
CONTENT_HEADING
,
Content
indexHead
=
HtmlTree
.
HEADING
(
HtmlConstants
.
CONTENT_HEADING
,
...
@@ -293,7 +293,7 @@ public class HelpWriter extends HtmlDocletWriter {
...
@@ -293,7 +293,7 @@ public class HelpWriter extends HtmlDocletWriter {
getResource
(
"doclet.All_Classes"
));
getResource
(
"doclet.All_Classes"
));
Content
liAllClasses
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
allclassesHead
);
Content
liAllClasses
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
allclassesHead
);
Content
line27
=
getResource
(
"doclet.Help_line_27"
,
Content
line27
=
getResource
(
"doclet.Help_line_27"
,
getHyperLinkString
(
"allclasses-noframe.html"
,
getHyperLinkString
(
DocPaths
.
ALLCLASSES_NOFRAME
,
configuration
.
getText
(
"doclet.All_Classes"
)));
configuration
.
getText
(
"doclet.All_Classes"
)));
Content
allclassesPara
=
HtmlTree
.
P
(
line27
);
Content
allclassesPara
=
HtmlTree
.
P
(
line27
);
liAllClasses
.
addContent
(
allclassesPara
);
liAllClasses
.
addContent
(
allclassesPara
);
...
@@ -309,7 +309,7 @@ public class HelpWriter extends HtmlDocletWriter {
...
@@ -309,7 +309,7 @@ public class HelpWriter extends HtmlDocletWriter {
getResource
(
"doclet.Constants_Summary"
));
getResource
(
"doclet.Constants_Summary"
));
Content
liConst
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
constHead
);
Content
liConst
=
HtmlTree
.
LI
(
HtmlStyle
.
blockList
,
constHead
);
Content
line29
=
getResource
(
"doclet.Help_line_29"
,
Content
line29
=
getResource
(
"doclet.Help_line_29"
,
getHyperLinkString
(
"constant-values.html"
,
getHyperLinkString
(
DocPaths
.
CONSTANT_VALUES
,
configuration
.
getText
(
"doclet.Constants_Summary"
)));
configuration
.
getText
(
"doclet.Constants_Summary"
)));
Content
constPara
=
HtmlTree
.
P
(
line29
);
Content
constPara
=
HtmlTree
.
P
(
line29
);
liConst
.
addContent
(
constPara
);
liConst
.
addContent
(
constPara
);
...
@@ -325,6 +325,7 @@ public class HelpWriter extends HtmlDocletWriter {
...
@@ -325,6 +325,7 @@ public class HelpWriter extends HtmlDocletWriter {
*
*
* @return a content tree for the help label
* @return a content tree for the help label
*/
*/
@Override
protected
Content
getNavLinkHelp
()
{
protected
Content
getNavLinkHelp
()
{
Content
li
=
HtmlTree
.
LI
(
HtmlStyle
.
navBarCell1Rev
,
helpLabel
);
Content
li
=
HtmlTree
.
LI
(
HtmlStyle
.
navBarCell1Rev
,
helpLabel
);
return
li
;
return
li
;
...
...
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
浏览文件 @
17c3050f
...
@@ -94,17 +94,11 @@ public class HtmlDoclet extends AbstractDoclet {
...
@@ -94,17 +94,11 @@ public class HtmlDoclet extends AbstractDoclet {
throws
Exception
{
throws
Exception
{
super
.
generateOtherFiles
(
root
,
classtree
);
super
.
generateOtherFiles
(
root
,
classtree
);
if
(
configuration
.
linksource
)
{
if
(
configuration
.
linksource
)
{
if
(
configuration
.
destDirName
.
length
()
>
0
)
{
SourceToHTMLConverter
.
convertRoot
(
configuration
,
SourceToHTMLConverter
.
convertRoot
(
configuration
,
root
,
DocPaths
.
SOURCE_OUTPUT
);
root
,
configuration
.
destDirName
+
File
.
separator
+
DocletConstants
.
SOURCE_OUTPUT_DIR_NAME
);
}
else
{
SourceToHTMLConverter
.
convertRoot
(
configuration
,
root
,
DocletConstants
.
SOURCE_OUTPUT_DIR_NAME
);
}
}
}
if
(
configuration
.
topFile
.
length
()
==
0
)
{
if
(
configuration
.
topFile
.
isEmpty
()
)
{
configuration
.
standardmessage
.
configuration
.
standardmessage
.
error
(
"doclet.No_Non_Deprecated_Classes_To_Document"
);
error
(
"doclet.No_Non_Deprecated_Classes_To_Document"
);
return
;
return
;
...
@@ -155,9 +149,8 @@ public class HtmlDoclet extends AbstractDoclet {
...
@@ -155,9 +149,8 @@ public class HtmlDoclet extends AbstractDoclet {
// If a stylesheet file is not specified, copy the default stylesheet
// If a stylesheet file is not specified, copy the default stylesheet
// and replace newline with platform-specific newline.
// and replace newline with platform-specific newline.
if
(
configuration
.
stylesheetfile
.
length
()
==
0
)
{
if
(
configuration
.
stylesheetfile
.
length
()
==
0
)
{
Util
.
copyFile
(
configuration
,
"stylesheet.css"
,
Util
.
RESOURCESDIR
,
Util
.
copyFile
(
configuration
,
"stylesheet.css"
,
DocPaths
.
RESOURCES
,
(
configdestdir
.
isEmpty
())
?
DocPath
.
empty
,
false
,
true
);
System
.
getProperty
(
"user.dir"
)
:
configdestdir
,
false
,
true
);
}
}
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
浏览文件 @
17c3050f
此差异已折叠。
点击以展开。
src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java
浏览文件 @
17c3050f
...
@@ -78,9 +78,9 @@ public class LinkFactoryImpl extends LinkFactory {
...
@@ -78,9 +78,9 @@ public class LinkFactoryImpl extends LinkFactory {
LinkOutputImpl
linkOutput
=
new
LinkOutputImpl
();
LinkOutputImpl
linkOutput
=
new
LinkOutputImpl
();
if
(
classDoc
.
isIncluded
())
{
if
(
classDoc
.
isIncluded
())
{
if
(
configuration
.
isGeneratedDoc
(
classDoc
))
{
if
(
configuration
.
isGeneratedDoc
(
classDoc
))
{
String
filename
=
pathString
(
classLinkInfo
);
DocPath
filename
=
getPath
(
classLinkInfo
);
if
(
linkInfo
.
linkToSelf
||
if
(
linkInfo
.
linkToSelf
||
!(
linkInfo
.
classDoc
.
name
()
+
".html"
).
equals
(
m_writer
.
filename
))
{
!(
DocPath
.
forName
(
classDoc
)
).
equals
(
m_writer
.
filename
))
{
linkOutput
.
append
(
m_writer
.
getHyperLinkString
(
filename
,
linkOutput
.
append
(
m_writer
.
getHyperLinkString
(
filename
,
classLinkInfo
.
where
,
label
.
toString
(),
classLinkInfo
.
where
,
label
.
toString
(),
classLinkInfo
.
isStrong
,
classLinkInfo
.
styleName
,
classLinkInfo
.
isStrong
,
classLinkInfo
.
styleName
,
...
@@ -161,16 +161,12 @@ public class LinkFactoryImpl extends LinkFactory {
...
@@ -161,16 +161,12 @@ public class LinkFactoryImpl extends LinkFactory {
*
*
* @param linkInfo the information about the link.
* @param linkInfo the information about the link.
*/
*/
private
String
pathString
(
LinkInfoImpl
linkInfo
)
{
private
DocPath
getPath
(
LinkInfoImpl
linkInfo
)
{
if
(
linkInfo
.
context
==
LinkInfoImpl
.
PACKAGE_FRAME
)
{
if
(
linkInfo
.
context
==
LinkInfoImpl
.
PACKAGE_FRAME
)
{
//Not really necessary to do this but we want to be consistent
//Not really necessary to do this but we want to be consistent
//with 1.4.2 output.
//with 1.4.2 output.
return
linkInfo
.
classDoc
.
name
()
+
".html"
;
return
DocPath
.
forName
(
linkInfo
.
classDoc
)
;
}
}
StringBuilder
buf
=
new
StringBuilder
(
m_writer
.
relativePath
);
return
m_writer
.
pathToRoot
.
resolve
(
DocPath
.
forClass
(
linkInfo
.
classDoc
));
buf
.
append
(
DirectoryManager
.
getPathToPackage
(
linkInfo
.
classDoc
.
containingPackage
(),
linkInfo
.
classDoc
.
name
()
+
".html"
));
return
buf
.
toString
();
}
}
}
}
src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java
浏览文件 @
17c3050f
...
@@ -400,7 +400,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
...
@@ -400,7 +400,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
*/
*/
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
if
(
link
)
{
if
(
link
)
{
return
writer
.
getHyperLink
(
""
,
(
cd
==
null
)?
return
writer
.
getHyperLink
((
cd
==
null
)?
"method_summary"
:
"method_summary"
:
"methods_inherited_from_class_"
+
"methods_inherited_from_class_"
+
configuration
().
getClassName
(
cd
),
configuration
().
getClassName
(
cd
),
...
@@ -415,7 +415,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
...
@@ -415,7 +415,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
*/
*/
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
protected
void
addNavDetailLink
(
boolean
link
,
Content
liNav
)
{
if
(
link
)
{
if
(
link
)
{
liNav
.
addContent
(
writer
.
getHyperLink
(
"
"
,
"
method_detail"
,
liNav
.
addContent
(
writer
.
getHyperLink
(
"method_detail"
,
writer
.
getResource
(
"doclet.navMethod"
)));
writer
.
getResource
(
"doclet.navMethod"
)));
}
else
{
}
else
{
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navMethod"
));
liNav
.
addContent
(
writer
.
getResource
(
"doclet.navMethod"
));
...
...
src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java
浏览文件 @
17c3050f
...
@@ -203,9 +203,8 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
...
@@ -203,9 +203,8 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
*/
*/
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
protected
Content
getNavSummaryLink
(
ClassDoc
cd
,
boolean
link
)
{
if
(
link
)
{
if
(
link
)
{
return
writer
.
getHyperLink
(
""
,
(
cd
==
null
)
?
"nested_class_summary"
:
return
writer
.
getHyperLink
((
cd
==
null
)
?
"nested_class_summary"
:
"nested_classes_inherited_from_class_"
+
"nested_classes_inherited_from_class_"
+
cd
.
qualifiedName
(),
cd
.
qualifiedName
(),
writer
.
getResource
(
"doclet.navNested"
));
writer
.
getResource
(
"doclet.navNested"
));
}
else
{
}
else
{
return
writer
.
getResource
(
"doclet.navNested"
);
return
writer
.
getResource
(
"doclet.navNested"
);
...
...
src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java
浏览文件 @
17c3050f
...
@@ -59,18 +59,13 @@ public class PackageFrameWriter extends HtmlDocletWriter {
...
@@ -59,18 +59,13 @@ public class PackageFrameWriter extends HtmlDocletWriter {
*/
*/
private
Set
<
ClassDoc
>
documentedClasses
;
private
Set
<
ClassDoc
>
documentedClasses
;
/**
* The name of the output file.
*/
public
static
final
String
OUTPUT_FILE_NAME
=
"package-frame.html"
;
/**
/**
* Constructor to construct PackageFrameWriter object and to generate
* Constructor to construct PackageFrameWriter object and to generate
* "package-frame.html" file in the respective package directory.
* "package-frame.html" file in the respective package directory.
* For example for package "java.lang" this will generate file
* For example for package "java.lang" this will generate file
* "package-frame.html" file in the "java/lang" directory. It will also
* "package-frame.html" file in the "java/lang" directory. It will also
* create "java/lang" directory in the current or the destination directory
* create "java/lang" directory in the current or the destination directory
* if it does
e
n't exist.
* if it doesn't exist.
*
*
* @param configuration the configuration of the doclet.
* @param configuration the configuration of the doclet.
* @param packageDoc PackageDoc under consideration.
* @param packageDoc PackageDoc under consideration.
...
@@ -78,7 +73,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
...
@@ -78,7 +73,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
public
PackageFrameWriter
(
ConfigurationImpl
configuration
,
public
PackageFrameWriter
(
ConfigurationImpl
configuration
,
PackageDoc
packageDoc
)
PackageDoc
packageDoc
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
D
irectoryManager
.
getDirectoryPath
(
packageDoc
),
OUTPUT_FILE_NAME
,
DirectoryManager
.
getRelativePath
(
packageDoc
));
super
(
configuration
,
D
ocPath
.
forPackage
(
packageDoc
).
resolve
(
DocPaths
.
PACKAGE_FRAME
));
this
.
packageDoc
=
packageDoc
;
this
.
packageDoc
=
packageDoc
;
if
(
configuration
.
root
.
specifiedPackages
().
length
==
0
)
{
if
(
configuration
.
root
.
specifiedPackages
().
length
==
0
)
{
documentedClasses
=
new
HashSet
<
ClassDoc
>(
Arrays
.
asList
(
configuration
.
root
.
classes
()));
documentedClasses
=
new
HashSet
<
ClassDoc
>(
Arrays
.
asList
(
configuration
.
root
.
classes
()));
...
@@ -113,7 +108,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
...
@@ -113,7 +108,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
}
catch
(
IOException
exc
)
{
}
catch
(
IOException
exc
)
{
configuration
.
standardmessage
.
error
(
configuration
.
standardmessage
.
error
(
"doclet.exception_encountered"
,
"doclet.exception_encountered"
,
exc
.
toString
(),
OUTPUT_FILE_NAME
);
exc
.
toString
(),
DocPaths
.
PACKAGE_FRAME
.
getPath
()
);
throw
new
DocletAbortException
();
throw
new
DocletAbortException
();
}
}
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java
浏览文件 @
17c3050f
...
@@ -52,7 +52,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
...
@@ -52,7 +52,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
* @param filename Name of the package index file to be generated.
* @param filename Name of the package index file to be generated.
*/
*/
public
PackageIndexFrameWriter
(
ConfigurationImpl
configuration
,
public
PackageIndexFrameWriter
(
ConfigurationImpl
configuration
,
String
filename
)
throws
IOException
{
DocPath
filename
)
throws
IOException
{
super
(
configuration
,
filename
);
super
(
configuration
,
filename
);
}
}
...
@@ -62,7 +62,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
...
@@ -62,7 +62,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
*/
*/
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
PackageIndexFrameWriter
packgen
;
PackageIndexFrameWriter
packgen
;
String
filename
=
"overview-frame.html"
;
DocPath
filename
=
DocPaths
.
OVERVIEW_FRAME
;
try
{
try
{
packgen
=
new
PackageIndexFrameWriter
(
configuration
,
filename
);
packgen
=
new
PackageIndexFrameWriter
(
configuration
,
filename
);
packgen
.
buildPackageIndexFile
(
"doclet.Window_Overview"
,
false
);
packgen
.
buildPackageIndexFile
(
"doclet.Window_Overview"
,
false
);
...
@@ -109,11 +109,11 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
...
@@ -109,11 +109,11 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
if
(
pd
.
name
().
length
()
>
0
)
{
if
(
pd
.
name
().
length
()
>
0
)
{
packageLabel
=
getPackageLabel
(
pd
.
name
());
packageLabel
=
getPackageLabel
(
pd
.
name
());
packageLinkContent
=
getHyperLink
(
pathString
(
pd
,
packageLinkContent
=
getHyperLink
(
pathString
(
pd
,
"package-frame.html"
),
""
,
packageLabel
,
""
,
DocPaths
.
PACKAGE_FRAME
),
""
,
packageLabel
,
""
,
"packageFrame"
);
"packageFrame"
);
}
else
{
}
else
{
packageLabel
=
new
RawHtml
(
"<unnamed package>"
);
packageLabel
=
new
RawHtml
(
"<unnamed package>"
);
packageLinkContent
=
getHyperLink
(
"package-frame.html"
,
packageLinkContent
=
getHyperLink
(
DocPaths
.
PACKAGE_FRAME
,
""
,
packageLabel
,
""
,
"packageFrame"
);
""
,
packageLabel
,
""
,
"packageFrame"
);
}
}
Content
li
=
HtmlTree
.
LI
(
packageLinkContent
);
Content
li
=
HtmlTree
.
LI
(
packageLinkContent
);
...
@@ -148,7 +148,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
...
@@ -148,7 +148,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
* @param body the Content object to which the all classes link should be added
* @param body the Content object to which the all classes link should be added
*/
*/
protected
void
addAllClassesLink
(
Content
body
)
{
protected
void
addAllClassesLink
(
Content
body
)
{
Content
linkContent
=
getHyperLink
(
"allclasses-frame.html"
,
""
,
Content
linkContent
=
getHyperLink
(
DocPaths
.
ALLCLASSES_FRAME
,
""
,
allclassesLabel
,
""
,
"packageFrame"
);
allclassesLabel
,
""
,
"packageFrame"
);
Content
div
=
HtmlTree
.
DIV
(
HtmlStyle
.
indexHeader
,
linkContent
);
Content
div
=
HtmlTree
.
DIV
(
HtmlStyle
.
indexHeader
,
linkContent
);
body
.
addContent
(
div
);
body
.
addContent
(
div
);
...
...
src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java
浏览文件 @
17c3050f
...
@@ -36,7 +36,7 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
...
@@ -36,7 +36,7 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/**
/**
* Generate the package index page "overview-summary.html" for the right-hand
* Generate the package index page "overview-summary.html" for the right-hand
* frame. A click on the package name on this page will update the same frame
* frame. A click on the package name on this page will update the same frame
* with the "pac
ak
ge-summary.html" file for the clicked package.
* with the "pac
ka
ge-summary.html" file for the clicked package.
*
*
* <p><b>This is NOT part of any supported API.
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* If you write code that depends on this, you do so at your own risk.
...
@@ -73,7 +73,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
...
@@ -73,7 +73,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
* @see Group
* @see Group
*/
*/
public
PackageIndexWriter
(
ConfigurationImpl
configuration
,
public
PackageIndexWriter
(
ConfigurationImpl
configuration
,
String
filename
)
DocPath
filename
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
filename
);
super
(
configuration
,
filename
);
this
.
root
=
configuration
.
root
;
this
.
root
=
configuration
.
root
;
...
@@ -88,7 +88,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
...
@@ -88,7 +88,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
*/
*/
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
public
static
void
generate
(
ConfigurationImpl
configuration
)
{
PackageIndexWriter
packgen
;
PackageIndexWriter
packgen
;
String
filename
=
"overview-summary.html"
;
DocPath
filename
=
DocPaths
.
OVERVIEW_SUMMARY
;
try
{
try
{
packgen
=
new
PackageIndexWriter
(
configuration
,
filename
);
packgen
=
new
PackageIndexWriter
(
configuration
,
filename
);
packgen
.
buildPackageIndexFile
(
"doclet.Window_Overview_Summary"
,
true
);
packgen
.
buildPackageIndexFile
(
"doclet.Window_Overview_Summary"
,
true
);
...
...
src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java
浏览文件 @
17c3050f
...
@@ -67,15 +67,14 @@ public class PackageTreeWriter extends AbstractTreeWriter {
...
@@ -67,15 +67,14 @@ public class PackageTreeWriter extends AbstractTreeWriter {
* @throws DocletAbortException
* @throws DocletAbortException
*/
*/
public
PackageTreeWriter
(
ConfigurationImpl
configuration
,
public
PackageTreeWriter
(
ConfigurationImpl
configuration
,
String
path
,
String
filename
,
DocPath
path
,
PackageDoc
packagedoc
,
PackageDoc
packagedoc
,
PackageDoc
prev
,
PackageDoc
next
)
PackageDoc
prev
,
PackageDoc
next
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
path
,
filename
,
super
(
configuration
,
path
,
new
ClassTree
(
new
ClassTree
(
configuration
.
classDocCatalog
.
allClasses
(
packagedoc
),
configuration
.
classDocCatalog
.
allClasses
(
packagedoc
),
configuration
),
configuration
));
packagedoc
);
this
.
packagedoc
=
packagedoc
;
this
.
packagedoc
=
packagedoc
;
this
.
prev
=
prev
;
this
.
prev
=
prev
;
this
.
next
=
next
;
this
.
next
=
next
;
...
@@ -96,17 +95,16 @@ public class PackageTreeWriter extends AbstractTreeWriter {
...
@@ -96,17 +95,16 @@ public class PackageTreeWriter extends AbstractTreeWriter {
PackageDoc
pkg
,
PackageDoc
prev
,
PackageDoc
pkg
,
PackageDoc
prev
,
PackageDoc
next
,
boolean
noDeprecated
)
{
PackageDoc
next
,
boolean
noDeprecated
)
{
PackageTreeWriter
packgen
;
PackageTreeWriter
packgen
;
String
path
=
DirectoryManager
.
getDirectoryPath
(
pkg
);
DocPath
path
=
DocPath
.
forPackage
(
pkg
).
resolve
(
DocPaths
.
PACKAGE_TREE
);
String
filename
=
"package-tree.html"
;
try
{
try
{
packgen
=
new
PackageTreeWriter
(
configuration
,
path
,
filename
,
pkg
,
packgen
=
new
PackageTreeWriter
(
configuration
,
path
,
pkg
,
prev
,
next
);
prev
,
next
);
packgen
.
generatePackageTreeFile
();
packgen
.
generatePackageTreeFile
();
packgen
.
close
();
packgen
.
close
();
}
catch
(
IOException
exc
)
{
}
catch
(
IOException
exc
)
{
configuration
.
standardmessage
.
error
(
configuration
.
standardmessage
.
error
(
"doclet.exception_encountered"
,
"doclet.exception_encountered"
,
exc
.
toString
(),
filename
);
exc
.
toString
(),
path
.
getPath
()
);
throw
new
DocletAbortException
();
throw
new
DocletAbortException
();
}
}
}
}
...
@@ -175,9 +173,8 @@ public class PackageTreeWriter extends AbstractTreeWriter {
...
@@ -175,9 +173,8 @@ public class PackageTreeWriter extends AbstractTreeWriter {
if
(
prev
==
null
)
{
if
(
prev
==
null
)
{
return
getNavLinkPrevious
(
null
);
return
getNavLinkPrevious
(
null
);
}
else
{
}
else
{
String
path
=
DirectoryManager
.
getRelativePath
(
packagedoc
.
name
(),
DocPath
path
=
DocPath
.
relativePath
(
packagedoc
,
prev
);
prev
.
name
());
return
getNavLinkPrevious
(
path
.
resolve
(
DocPaths
.
PACKAGE_TREE
));
return
getNavLinkPrevious
(
path
+
"package-tree.html"
);
}
}
}
}
...
@@ -190,9 +187,8 @@ public class PackageTreeWriter extends AbstractTreeWriter {
...
@@ -190,9 +187,8 @@ public class PackageTreeWriter extends AbstractTreeWriter {
if
(
next
==
null
)
{
if
(
next
==
null
)
{
return
getNavLinkNext
(
null
);
return
getNavLinkNext
(
null
);
}
else
{
}
else
{
String
path
=
DirectoryManager
.
getRelativePath
(
packagedoc
.
name
(),
DocPath
path
=
DocPath
.
relativePath
(
packagedoc
,
next
);
next
.
name
());
return
getNavLinkNext
(
path
.
resolve
(
DocPaths
.
PACKAGE_TREE
));
return
getNavLinkNext
(
path
+
"package-tree.html"
);
}
}
}
}
...
@@ -202,7 +198,7 @@ public class PackageTreeWriter extends AbstractTreeWriter {
...
@@ -202,7 +198,7 @@ public class PackageTreeWriter extends AbstractTreeWriter {
* @return a content tree for the package link
* @return a content tree for the package link
*/
*/
protected
Content
getNavLinkPackage
()
{
protected
Content
getNavLinkPackage
()
{
Content
linkContent
=
getHyperLink
(
"package-summary.html"
,
""
,
Content
linkContent
=
getHyperLink
(
DocPaths
.
PACKAGE_SUMMARY
,
""
,
packageLabel
);
packageLabel
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
return
li
;
return
li
;
...
...
src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
浏览文件 @
17c3050f
...
@@ -57,11 +57,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
...
@@ -57,11 +57,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
* @throws DocletAbortException
* @throws DocletAbortException
*/
*/
public
PackageUseWriter
(
ConfigurationImpl
configuration
,
public
PackageUseWriter
(
ConfigurationImpl
configuration
,
ClassUseMapper
mapper
,
String
filename
,
ClassUseMapper
mapper
,
DocPath
filename
,
PackageDoc
pkgdoc
)
throws
IOException
{
PackageDoc
pkgdoc
)
throws
IOException
{
super
(
configuration
,
DirectoryManager
.
getDirectoryPath
(
pkgdoc
),
super
(
configuration
,
DocPath
.
forPackage
(
pkgdoc
).
resolve
(
filename
));
filename
,
DirectoryManager
.
getRelativePath
(
pkgdoc
.
name
()));
this
.
pkgdoc
=
pkgdoc
;
this
.
pkgdoc
=
pkgdoc
;
// by examining all classes in this package, find what packages
// by examining all classes in this package, find what packages
...
@@ -98,7 +96,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
...
@@ -98,7 +96,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
public
static
void
generate
(
ConfigurationImpl
configuration
,
public
static
void
generate
(
ConfigurationImpl
configuration
,
ClassUseMapper
mapper
,
PackageDoc
pkgdoc
)
{
ClassUseMapper
mapper
,
PackageDoc
pkgdoc
)
{
PackageUseWriter
pkgusegen
;
PackageUseWriter
pkgusegen
;
String
filename
=
"package-use.html"
;
DocPath
filename
=
DocPaths
.
PACKAGE_USE
;
try
{
try
{
pkgusegen
=
new
PackageUseWriter
(
configuration
,
pkgusegen
=
new
PackageUseWriter
(
configuration
,
mapper
,
filename
,
pkgdoc
);
mapper
,
filename
,
pkgdoc
);
...
@@ -232,8 +230,8 @@ public class PackageUseWriter extends SubWriterHolderWriter {
...
@@ -232,8 +230,8 @@ public class PackageUseWriter extends SubWriterHolderWriter {
*/
*/
protected
void
addClassRow
(
ClassDoc
usedClass
,
String
packageName
,
protected
void
addClassRow
(
ClassDoc
usedClass
,
String
packageName
,
Content
contentTree
)
{
Content
contentTree
)
{
String
path
=
pathString
(
usedClass
,
DocPath
path
=
pathString
(
usedClass
,
"class-use/"
+
usedClass
.
name
()
+
".html"
);
DocPaths
.
CLASS_USE
.
resolve
(
DocPath
.
forName
(
usedClass
))
);
Content
td
=
HtmlTree
.
TD
(
HtmlStyle
.
colOne
,
Content
td
=
HtmlTree
.
TD
(
HtmlStyle
.
colOne
,
getHyperLink
(
path
,
packageName
,
new
StringContent
(
usedClass
.
name
())));
getHyperLink
(
path
,
packageName
,
new
StringContent
(
usedClass
.
name
())));
addIndexComment
(
usedClass
,
td
);
addIndexComment
(
usedClass
,
td
);
...
@@ -248,7 +246,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
...
@@ -248,7 +246,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
*/
*/
protected
void
addPackageUse
(
PackageDoc
pkg
,
Content
contentTree
)
throws
IOException
{
protected
void
addPackageUse
(
PackageDoc
pkg
,
Content
contentTree
)
throws
IOException
{
Content
tdFirst
=
HtmlTree
.
TD
(
HtmlStyle
.
colFirst
,
Content
tdFirst
=
HtmlTree
.
TD
(
HtmlStyle
.
colFirst
,
getHyperLink
(
""
,
Util
.
getPackageName
(
pkg
),
getHyperLink
(
Util
.
getPackageName
(
pkg
),
new
RawHtml
(
Util
.
getPackageName
(
pkg
))));
new
RawHtml
(
Util
.
getPackageName
(
pkg
))));
contentTree
.
addContent
(
tdFirst
);
contentTree
.
addContent
(
tdFirst
);
HtmlTree
tdLast
=
new
HtmlTree
(
HtmlTag
.
TD
);
HtmlTree
tdLast
=
new
HtmlTree
(
HtmlTag
.
TD
);
...
@@ -288,7 +286,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
...
@@ -288,7 +286,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
* @return a content tree for the package link
* @return a content tree for the package link
*/
*/
protected
Content
getNavLinkPackage
()
{
protected
Content
getNavLinkPackage
()
{
Content
linkContent
=
getHyperLink
(
"package-summary.html"
,
""
,
Content
linkContent
=
getHyperLink
(
DocPaths
.
PACKAGE_SUMMARY
,
""
,
packageLabel
);
packageLabel
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
return
li
;
return
li
;
...
@@ -310,7 +308,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
...
@@ -310,7 +308,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
* @return a content tree for the tree link
* @return a content tree for the tree link
*/
*/
protected
Content
getNavLinkTree
()
{
protected
Content
getNavLinkTree
()
{
Content
linkContent
=
getHyperLink
(
"package-tree.html"
,
""
,
Content
linkContent
=
getHyperLink
(
DocPaths
.
PACKAGE_TREE
,
""
,
treeLabel
);
treeLabel
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
Content
li
=
HtmlTree
.
LI
(
linkContent
);
return
li
;
return
li
;
...
...
src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java
浏览文件 @
17c3050f
...
@@ -64,18 +64,13 @@ public class PackageWriterImpl extends HtmlDocletWriter
...
@@ -64,18 +64,13 @@ public class PackageWriterImpl extends HtmlDocletWriter
*/
*/
protected
PackageDoc
packageDoc
;
protected
PackageDoc
packageDoc
;
/**
* The name of the output file.
*/
private
static
final
String
OUTPUT_FILE_NAME
=
"package-summary.html"
;
/**
/**
* Constructor to construct PackageWriter object and to generate
* Constructor to construct PackageWriter object and to generate
* "package-summary.html" file in the respective package directory.
* "package-summary.html" file in the respective package directory.
* For example for package "java.lang" this will generate file
* For example for package "java.lang" this will generate file
* "package-summary.html" file in the "java/lang" directory. It will also
* "package-summary.html" file in the "java/lang" directory. It will also
* create "java/lang" directory in the current or the destination directory
* create "java/lang" directory in the current or the destination directory
* if it does
e
n't exist.
* if it doesn't exist.
*
*
* @param configuration the configuration of the doclet.
* @param configuration the configuration of the doclet.
* @param packageDoc PackageDoc under consideration.
* @param packageDoc PackageDoc under consideration.
...
@@ -83,24 +78,14 @@ public class PackageWriterImpl extends HtmlDocletWriter
...
@@ -83,24 +78,14 @@ public class PackageWriterImpl extends HtmlDocletWriter
* @param next Next package in the sorted array.
* @param next Next package in the sorted array.
*/
*/
public
PackageWriterImpl
(
ConfigurationImpl
configuration
,
public
PackageWriterImpl
(
ConfigurationImpl
configuration
,
PackageDoc
packageDoc
,
PackageDoc
prev
,
PackageDoc
next
)
PackageDoc
packageDoc
,
PackageDoc
prev
,
PackageDoc
next
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
DirectoryManager
.
getDirectoryPath
(
packageDoc
),
OUTPUT_FILE_NAME
,
super
(
configuration
,
DocPath
.
forPackage
(
packageDoc
).
resolve
(
DocPaths
.
PACKAGE_SUMMARY
));
DirectoryManager
.
getRelativePath
(
packageDoc
.
name
()));
this
.
prev
=
prev
;
this
.
prev
=
prev
;
this
.
next
=
next
;
this
.
next
=
next
;
this
.
packageDoc
=
packageDoc
;
this
.
packageDoc
=
packageDoc
;
}
}
/**
* Return the name of the output file.
*
* @return the name of the output file.
*/
public
String
getOutputFileName
()
{
return
OUTPUT_FILE_NAME
;
}
/**
/**
* {@inheritDoc}
* {@inheritDoc}
*/
*/
...
@@ -265,7 +250,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
...
@@ -265,7 +250,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
* @return a content tree for the class use link
* @return a content tree for the class use link
*/
*/
protected
Content
getNavLinkClassUse
()
{
protected
Content
getNavLinkClassUse
()
{
Content
useLink
=
getHyperLink
(
"package-use.html"
,
""
,
Content
useLink
=
getHyperLink
(
DocPaths
.
PACKAGE_USE
,
""
,
useLabel
,
""
,
""
);
useLabel
,
""
,
""
);
Content
li
=
HtmlTree
.
LI
(
useLink
);
Content
li
=
HtmlTree
.
LI
(
useLink
);
return
li
;
return
li
;
...
@@ -281,9 +266,8 @@ public class PackageWriterImpl extends HtmlDocletWriter
...
@@ -281,9 +266,8 @@ public class PackageWriterImpl extends HtmlDocletWriter
if
(
prev
==
null
)
{
if
(
prev
==
null
)
{
li
=
HtmlTree
.
LI
(
prevpackageLabel
);
li
=
HtmlTree
.
LI
(
prevpackageLabel
);
}
else
{
}
else
{
String
path
=
DirectoryManager
.
getRelativePath
(
packageDoc
.
name
(),
DocPath
path
=
DocPath
.
relativePath
(
packageDoc
,
prev
);
prev
.
name
());
li
=
HtmlTree
.
LI
(
getHyperLink
(
path
.
resolve
(
DocPaths
.
PACKAGE_SUMMARY
),
""
,
li
=
HtmlTree
.
LI
(
getHyperLink
(
path
+
"package-summary.html"
,
""
,
prevpackageLabel
,
""
,
""
));
prevpackageLabel
,
""
,
""
));
}
}
return
li
;
return
li
;
...
@@ -299,9 +283,8 @@ public class PackageWriterImpl extends HtmlDocletWriter
...
@@ -299,9 +283,8 @@ public class PackageWriterImpl extends HtmlDocletWriter
if
(
next
==
null
)
{
if
(
next
==
null
)
{
li
=
HtmlTree
.
LI
(
nextpackageLabel
);
li
=
HtmlTree
.
LI
(
nextpackageLabel
);
}
else
{
}
else
{
String
path
=
DirectoryManager
.
getRelativePath
(
packageDoc
.
name
(),
DocPath
path
=
DocPath
.
relativePath
(
packageDoc
,
next
);
next
.
name
());
li
=
HtmlTree
.
LI
(
getHyperLink
(
path
.
resolve
(
DocPaths
.
PACKAGE_SUMMARY
),
""
,
li
=
HtmlTree
.
LI
(
getHyperLink
(
path
+
"package-summary.html"
,
""
,
nextpackageLabel
,
""
,
""
));
nextpackageLabel
,
""
,
""
));
}
}
return
li
;
return
li
;
...
@@ -314,7 +297,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
...
@@ -314,7 +297,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
* @return a content tree for the tree link
* @return a content tree for the tree link
*/
*/
protected
Content
getNavLinkTree
()
{
protected
Content
getNavLinkTree
()
{
Content
useLink
=
getHyperLink
(
"package-tree.html"
,
""
,
Content
useLink
=
getHyperLink
(
DocPaths
.
PACKAGE_TREE
,
""
,
treeLabel
,
""
,
""
);
treeLabel
,
""
,
""
);
Content
li
=
HtmlTree
.
LI
(
useLink
);
Content
li
=
HtmlTree
.
LI
(
useLink
);
return
li
;
return
li
;
...
...
src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java
浏览文件 @
17c3050f
...
@@ -29,6 +29,7 @@ import java.io.*;
...
@@ -29,6 +29,7 @@ import java.io.*;
import
com.sun.javadoc.*
;
import
com.sun.javadoc.*
;
import
com.sun.tools.doclets.formats.html.markup.*
;
import
com.sun.tools.doclets.formats.html.markup.*
;
import
com.sun.tools.doclets.internal.toolkit.*
;
import
com.sun.tools.doclets.internal.toolkit.*
;
import
com.sun.tools.doclets.internal.toolkit.util.DocPaths
;
import
com.sun.tools.doclets.internal.toolkit.util.DocletAbortException
;
import
com.sun.tools.doclets.internal.toolkit.util.DocletAbortException
;
/**
/**
...
@@ -44,14 +45,12 @@ import com.sun.tools.doclets.internal.toolkit.util.DocletAbortException;
...
@@ -44,14 +45,12 @@ import com.sun.tools.doclets.internal.toolkit.util.DocletAbortException;
public
class
SerializedFormWriterImpl
extends
SubWriterHolderWriter
public
class
SerializedFormWriterImpl
extends
SubWriterHolderWriter
implements
SerializedFormWriter
{
implements
SerializedFormWriter
{
private
static
final
String
FILE_NAME
=
"serialized-form.html"
;
/**
/**
* @throws IOException
* @throws IOException
* @throws DocletAbortException
* @throws DocletAbortException
*/
*/
public
SerializedFormWriterImpl
()
throws
IOException
{
public
SerializedFormWriterImpl
()
throws
IOException
{
super
(
ConfigurationImpl
.
getInstance
(),
FILE_NAME
);
super
(
ConfigurationImpl
.
getInstance
(),
DocPaths
.
SERIALIZED_FORM
);
}
}
/**
/**
...
...
src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java
浏览文件 @
17c3050f
...
@@ -55,11 +55,9 @@ public class SingleIndexWriter extends AbstractIndexWriter {
...
@@ -55,11 +55,9 @@ public class SingleIndexWriter extends AbstractIndexWriter {
* @param indexbuilder Unicode based Index from {@link IndexBuilder}
* @param indexbuilder Unicode based Index from {@link IndexBuilder}
*/
*/
public
SingleIndexWriter
(
ConfigurationImpl
configuration
,
public
SingleIndexWriter
(
ConfigurationImpl
configuration
,
String
filename
,
DocPath
filename
,
IndexBuilder
indexbuilder
)
throws
IOException
{
IndexBuilder
indexbuilder
)
throws
IOException
{
super
(
configuration
,
filename
,
indexbuilder
);
super
(
configuration
,
filename
,
indexbuilder
);
relativepathNoSlash
=
"."
;
relativePath
=
"./"
;
}
}
/**
/**
...
@@ -71,7 +69,7 @@ public class SingleIndexWriter extends AbstractIndexWriter {
...
@@ -71,7 +69,7 @@ public class SingleIndexWriter extends AbstractIndexWriter {
public
static
void
generate
(
ConfigurationImpl
configuration
,
public
static
void
generate
(
ConfigurationImpl
configuration
,
IndexBuilder
indexbuilder
)
{
IndexBuilder
indexbuilder
)
{
SingleIndexWriter
indexgen
;
SingleIndexWriter
indexgen
;
String
filename
=
"index-all.html"
;
DocPath
filename
=
DocPaths
.
INDEX_ALL
;
try
{
try
{
indexgen
=
new
SingleIndexWriter
(
configuration
,
indexgen
=
new
SingleIndexWriter
(
configuration
,
filename
,
indexbuilder
);
filename
,
indexbuilder
);
...
@@ -117,7 +115,7 @@ public class SingleIndexWriter extends AbstractIndexWriter {
...
@@ -117,7 +115,7 @@ public class SingleIndexWriter extends AbstractIndexWriter {
for
(
int
i
=
0
;
i
<
indexbuilder
.
elements
().
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
indexbuilder
.
elements
().
length
;
i
++)
{
String
unicode
=
(
indexbuilder
.
elements
())[
i
].
toString
();
String
unicode
=
(
indexbuilder
.
elements
())[
i
].
toString
();
contentTree
.
addContent
(
contentTree
.
addContent
(
getHyperLink
(
"
#
_"
+
unicode
+
"_"
,
new
StringContent
(
unicode
)));
getHyperLink
(
"_"
+
unicode
+
"_"
,
new
StringContent
(
unicode
)));
contentTree
.
addContent
(
getSpace
());
contentTree
.
addContent
(
getSpace
());
}
}
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java
浏览文件 @
17c3050f
...
@@ -62,7 +62,7 @@ public class SourceToHTMLConverter {
...
@@ -62,7 +62,7 @@ public class SourceToHTMLConverter {
* Relative path from the documentation root to the file that is being
* Relative path from the documentation root to the file that is being
* generated.
* generated.
*/
*/
private
static
String
relativePath
=
""
;
private
static
DocPath
relativePath
=
DocPath
.
empty
;
/**
/**
* Source is converted to HTML using static methods below.
* Source is converted to HTML using static methods below.
...
@@ -77,7 +77,7 @@ public class SourceToHTMLConverter {
...
@@ -77,7 +77,7 @@ public class SourceToHTMLConverter {
* @param outputdir the name of the directory to output to.
* @param outputdir the name of the directory to output to.
*/
*/
public
static
void
convertRoot
(
ConfigurationImpl
configuration
,
RootDoc
rd
,
public
static
void
convertRoot
(
ConfigurationImpl
configuration
,
RootDoc
rd
,
String
outputdir
)
{
DocPath
outputdir
)
{
if
(
rd
==
null
||
outputdir
==
null
)
{
if
(
rd
==
null
||
outputdir
==
null
)
{
return
;
return
;
}
}
...
@@ -108,11 +108,11 @@ public class SourceToHTMLConverter {
...
@@ -108,11 +108,11 @@ public class SourceToHTMLConverter {
* @param outputdir the name of the directory to output to.
* @param outputdir the name of the directory to output to.
*/
*/
public
static
void
convertPackage
(
ConfigurationImpl
configuration
,
PackageDoc
pd
,
public
static
void
convertPackage
(
ConfigurationImpl
configuration
,
PackageDoc
pd
,
String
outputdir
)
{
DocPath
outputdir
)
{
if
(
pd
==
null
||
outputdir
==
null
)
{
if
(
pd
==
null
||
outputdir
==
null
)
{
return
;
return
;
}
}
String
classOutputdir
=
getPackageOutputDir
(
outputdir
,
pd
);
DocPath
classOutputdir
=
getPackageOutputDir
(
outputdir
,
pd
);
ClassDoc
[]
cds
=
pd
.
allClasses
();
ClassDoc
[]
cds
=
pd
.
allClasses
();
for
(
int
i
=
0
;
i
<
cds
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
cds
.
length
;
i
++)
{
// If -nodeprecated option is set and the class is marked as deprecated,
// If -nodeprecated option is set and the class is marked as deprecated,
...
@@ -131,9 +131,8 @@ public class SourceToHTMLConverter {
...
@@ -131,9 +131,8 @@ public class SourceToHTMLConverter {
* @param pd the Package to generate output for.
* @param pd the Package to generate output for.
* @return the package output directory as a String.
* @return the package output directory as a String.
*/
*/
private
static
String
getPackageOutputDir
(
String
outputDir
,
PackageDoc
pd
)
{
private
static
DocPath
getPackageOutputDir
(
DocPath
outputDir
,
PackageDoc
pd
)
{
return
outputDir
+
File
.
separator
+
return
outputDir
.
resolve
(
DocPath
.
forPackage
(
pd
));
DirectoryManager
.
getDirectoryPath
(
pd
)
+
File
.
separator
;
}
}
/**
/**
...
@@ -144,7 +143,7 @@ public class SourceToHTMLConverter {
...
@@ -144,7 +143,7 @@ public class SourceToHTMLConverter {
* @param outputdir the name of the directory to output to.
* @param outputdir the name of the directory to output to.
*/
*/
public
static
void
convertClass
(
ConfigurationImpl
configuration
,
ClassDoc
cd
,
public
static
void
convertClass
(
ConfigurationImpl
configuration
,
ClassDoc
cd
,
String
outputdir
)
{
DocPath
outputdir
)
{
if
(
cd
==
null
||
outputdir
==
null
)
{
if
(
cd
==
null
||
outputdir
==
null
)
{
return
;
return
;
}
}
...
@@ -168,8 +167,9 @@ public class SourceToHTMLConverter {
...
@@ -168,8 +167,9 @@ public class SourceToHTMLConverter {
LineNumberReader
reader
=
new
LineNumberReader
(
r
);
LineNumberReader
reader
=
new
LineNumberReader
(
r
);
int
lineno
=
1
;
int
lineno
=
1
;
String
line
;
String
line
;
relativePath
=
DirectoryManager
.
getRelativePath
(
DocletConstants
.
SOURCE_OUTPUT_DIR_NAME
)
+
relativePath
=
DocPaths
.
SOURCE_OUTPUT
DirectoryManager
.
getRelativePath
(
cd
.
containingPackage
());
.
resolve
(
DocPath
.
forPackage
(
cd
))
.
invert
();
Content
body
=
getHeader
();
Content
body
=
getHeader
();
Content
pre
=
new
HtmlTree
(
HtmlTag
.
PRE
);
Content
pre
=
new
HtmlTree
(
HtmlTag
.
PRE
);
try
{
try
{
...
@@ -198,7 +198,7 @@ public class SourceToHTMLConverter {
...
@@ -198,7 +198,7 @@ public class SourceToHTMLConverter {
* @param className the name of the class that I am converting to HTML.
* @param className the name of the class that I am converting to HTML.
* @param configuration the Doclet configuration to pass notices to.
* @param configuration the Doclet configuration to pass notices to.
*/
*/
private
static
void
writeToFile
(
Content
body
,
String
outputDir
,
private
static
void
writeToFile
(
Content
body
,
DocPath
outputDir
,
String
className
,
ConfigurationImpl
configuration
)
throws
IOException
{
String
className
,
ConfigurationImpl
configuration
)
throws
IOException
{
Content
htmlDocType
=
DocType
.
Transitional
();
Content
htmlDocType
=
DocType
.
Transitional
();
Content
head
=
new
HtmlTree
(
HtmlTag
.
HEAD
);
Content
head
=
new
HtmlTree
(
HtmlTag
.
HEAD
);
...
@@ -208,7 +208,7 @@ public class SourceToHTMLConverter {
...
@@ -208,7 +208,7 @@ public class SourceToHTMLConverter {
Content
htmlTree
=
HtmlTree
.
HTML
(
configuration
.
getLocale
().
getLanguage
(),
Content
htmlTree
=
HtmlTree
.
HTML
(
configuration
.
getLocale
().
getLanguage
(),
head
,
body
);
head
,
body
);
Content
htmlDocument
=
new
HtmlDocument
(
htmlDocType
,
htmlTree
);
Content
htmlDocument
=
new
HtmlDocument
(
htmlDocType
,
htmlTree
);
File
dir
=
new
File
(
outputDir
);
File
dir
=
outputDir
.
resolveAgainst
(
configuration
.
destDirName
);
dir
.
mkdirs
();
dir
.
mkdirs
();
File
newFile
=
new
File
(
dir
,
className
+
".html"
);
File
newFile
=
new
File
(
dir
,
className
+
".html"
);
configuration
.
message
.
notice
(
"doclet.Generating_0"
,
newFile
.
getPath
());
configuration
.
message
.
notice
(
"doclet.Generating_0"
,
newFile
.
getPath
());
...
@@ -227,17 +227,14 @@ public class SourceToHTMLConverter {
...
@@ -227,17 +227,14 @@ public class SourceToHTMLConverter {
*/
*/
public
static
HtmlTree
getStyleSheetProperties
(
ConfigurationImpl
configuration
)
{
public
static
HtmlTree
getStyleSheetProperties
(
ConfigurationImpl
configuration
)
{
String
filename
=
configuration
.
stylesheetfile
;
String
filename
=
configuration
.
stylesheetfile
;
DocPath
stylesheet
;
if
(
filename
.
length
()
>
0
)
{
if
(
filename
.
length
()
>
0
)
{
File
stylefile
=
new
File
(
filename
);
stylesheet
=
DocPath
.
create
(
new
File
(
filename
).
getName
());
String
parent
=
stylefile
.
getParent
();
filename
=
(
parent
==
null
)?
filename:
filename
.
substring
(
parent
.
length
()
+
1
);
}
else
{
}
else
{
filename
=
"stylesheet.css"
;
stylesheet
=
DocPaths
.
STYLESHEET
;
}
}
filename
=
relativePath
+
filename
;
DocPath
p
=
relativePath
.
resolve
(
stylesheet
)
;
HtmlTree
link
=
HtmlTree
.
LINK
(
"stylesheet"
,
"text/css"
,
filename
,
"Style"
);
HtmlTree
link
=
HtmlTree
.
LINK
(
"stylesheet"
,
"text/css"
,
p
.
getPath
()
,
"Style"
);
return
link
;
return
link
;
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter.java
浏览文件 @
17c3050f
...
@@ -67,10 +67,10 @@ public class SplitIndexWriter extends AbstractIndexWriter {
...
@@ -67,10 +67,10 @@ public class SplitIndexWriter extends AbstractIndexWriter {
* @param indexbuilder Unicode based Index from {@link IndexBuilder}
* @param indexbuilder Unicode based Index from {@link IndexBuilder}
*/
*/
public
SplitIndexWriter
(
ConfigurationImpl
configuration
,
public
SplitIndexWriter
(
ConfigurationImpl
configuration
,
String
path
,
String
filename
,
DocPath
path
,
String
relpath
,
IndexBuilder
indexbuilder
,
IndexBuilder
indexbuilder
,
int
prev
,
int
next
)
throws
IOException
{
int
prev
,
int
next
)
throws
IOException
{
super
(
configuration
,
path
,
filename
,
relpath
,
indexbuilder
);
super
(
configuration
,
path
,
indexbuilder
);
this
.
prev
=
prev
;
this
.
prev
=
prev
;
this
.
next
=
next
;
this
.
next
=
next
;
}
}
...
@@ -85,17 +85,16 @@ public class SplitIndexWriter extends AbstractIndexWriter {
...
@@ -85,17 +85,16 @@ public class SplitIndexWriter extends AbstractIndexWriter {
public
static
void
generate
(
ConfigurationImpl
configuration
,
public
static
void
generate
(
ConfigurationImpl
configuration
,
IndexBuilder
indexbuilder
)
{
IndexBuilder
indexbuilder
)
{
SplitIndexWriter
indexgen
;
SplitIndexWriter
indexgen
;
String
filename
=
""
;
DocPath
filename
=
DocPath
.
empty
;
String
path
=
DirectoryManager
.
getPath
(
"index-files"
);
DocPath
path
=
DocPaths
.
INDEX_FILES
;
String
relpath
=
DirectoryManager
.
getRelativePath
(
"index-files"
);
try
{
try
{
for
(
int
i
=
0
;
i
<
indexbuilder
.
elements
().
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
indexbuilder
.
elements
().
length
;
i
++)
{
int
j
=
i
+
1
;
int
j
=
i
+
1
;
int
prev
=
(
j
==
1
)?
-
1
:
i
;
int
prev
=
(
j
==
1
)?
-
1
:
i
;
int
next
=
(
j
==
indexbuilder
.
elements
().
length
)?
-
1
:
j
+
1
;
int
next
=
(
j
==
indexbuilder
.
elements
().
length
)?
-
1
:
j
+
1
;
filename
=
"index-"
+
j
+
".html"
;
filename
=
DocPaths
.
indexN
(
j
)
;
indexgen
=
new
SplitIndexWriter
(
configuration
,
indexgen
=
new
SplitIndexWriter
(
configuration
,
path
,
filename
,
relpath
,
path
.
resolve
(
filename
)
,
indexbuilder
,
prev
,
next
);
indexbuilder
,
prev
,
next
);
indexgen
.
generateIndexFile
((
Character
)
indexbuilder
.
indexgen
.
generateIndexFile
((
Character
)
indexbuilder
.
elements
()[
i
]);
elements
()[
i
]);
...
@@ -104,7 +103,7 @@ public class SplitIndexWriter extends AbstractIndexWriter {
...
@@ -104,7 +103,7 @@ public class SplitIndexWriter extends AbstractIndexWriter {
}
catch
(
IOException
exc
)
{
}
catch
(
IOException
exc
)
{
configuration
.
standardmessage
.
error
(
configuration
.
standardmessage
.
error
(
"doclet.exception_encountered"
,
"doclet.exception_encountered"
,
exc
.
toString
(),
filename
);
exc
.
toString
(),
filename
.
getPath
()
);
throw
new
DocletAbortException
();
throw
new
DocletAbortException
();
}
}
}
}
...
@@ -142,7 +141,7 @@ public class SplitIndexWriter extends AbstractIndexWriter {
...
@@ -142,7 +141,7 @@ public class SplitIndexWriter extends AbstractIndexWriter {
Object
[]
unicodeChars
=
indexbuilder
.
elements
();
Object
[]
unicodeChars
=
indexbuilder
.
elements
();
for
(
int
i
=
0
;
i
<
unicodeChars
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
unicodeChars
.
length
;
i
++)
{
int
j
=
i
+
1
;
int
j
=
i
+
1
;
contentTree
.
addContent
(
getHyperLink
(
"index-"
+
j
+
".html"
,
contentTree
.
addContent
(
getHyperLink
(
DocPaths
.
indexN
(
j
)
,
new
StringContent
(
unicodeChars
[
i
].
toString
())));
new
StringContent
(
unicodeChars
[
i
].
toString
())));
contentTree
.
addContent
(
getSpace
());
contentTree
.
addContent
(
getSpace
());
}
}
...
@@ -159,7 +158,7 @@ public class SplitIndexWriter extends AbstractIndexWriter {
...
@@ -159,7 +158,7 @@ public class SplitIndexWriter extends AbstractIndexWriter {
return
HtmlTree
.
LI
(
prevletterLabel
);
return
HtmlTree
.
LI
(
prevletterLabel
);
}
}
else
{
else
{
Content
prevLink
=
getHyperLink
(
"index-"
+
prev
+
".html"
,
""
,
Content
prevLink
=
getHyperLink
(
DocPaths
.
indexN
(
prev
)
,
""
,
prevletterLabel
);
prevletterLabel
);
return
HtmlTree
.
LI
(
prevLink
);
return
HtmlTree
.
LI
(
prevLink
);
}
}
...
@@ -176,7 +175,7 @@ public class SplitIndexWriter extends AbstractIndexWriter {
...
@@ -176,7 +175,7 @@ public class SplitIndexWriter extends AbstractIndexWriter {
return
HtmlTree
.
LI
(
nextletterLabel
);
return
HtmlTree
.
LI
(
nextletterLabel
);
}
}
else
{
else
{
Content
nextLink
=
getHyperLink
(
"index-"
+
next
+
".html"
,
""
,
Content
nextLink
=
getHyperLink
(
DocPaths
.
indexN
(
next
),
""
,
nextletterLabel
);
nextletterLabel
);
return
HtmlTree
.
LI
(
nextLink
);
return
HtmlTree
.
LI
(
nextLink
);
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
浏览文件 @
17c3050f
...
@@ -54,18 +54,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
...
@@ -54,18 +54,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
*/
*/
public
abstract
class
SubWriterHolderWriter
extends
HtmlDocletWriter
{
public
abstract
class
SubWriterHolderWriter
extends
HtmlDocletWriter
{
public
SubWriterHolderWriter
(
ConfigurationImpl
configuration
,
public
SubWriterHolderWriter
(
ConfigurationImpl
configuration
,
DocPath
filename
)
String
filename
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
filename
);
super
(
configuration
,
filename
);
}
}
public
SubWriterHolderWriter
(
ConfigurationImpl
configuration
,
String
path
,
String
filename
,
String
relpath
)
throws
IOException
{
super
(
configuration
,
path
,
filename
,
relpath
);
}
/**
/**
* Add the summary header.
* Add the summary header.
*
*
...
...
src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
浏览文件 @
17c3050f
...
@@ -66,8 +66,10 @@ public class TagletWriterImpl extends TagletWriter {
...
@@ -66,8 +66,10 @@ public class TagletWriterImpl extends TagletWriter {
public
TagletOutput
getDocRootOutput
()
{
public
TagletOutput
getDocRootOutput
()
{
if
(
htmlWriter
.
configuration
.
docrootparent
.
length
()
>
0
)
if
(
htmlWriter
.
configuration
.
docrootparent
.
length
()
>
0
)
return
new
TagletOutputImpl
(
htmlWriter
.
configuration
.
docrootparent
);
return
new
TagletOutputImpl
(
htmlWriter
.
configuration
.
docrootparent
);
else
if
(
htmlWriter
.
pathToRoot
.
isEmpty
())
return
new
TagletOutputImpl
(
"."
);
else
else
return
new
TagletOutputImpl
(
htmlWriter
.
relativepathNoSlash
);
return
new
TagletOutputImpl
(
htmlWriter
.
pathToRoot
.
getPath
()
);
}
}
/**
/**
...
@@ -170,18 +172,18 @@ public class TagletWriterImpl extends TagletWriter {
...
@@ -170,18 +172,18 @@ public class TagletWriterImpl extends TagletWriter {
htmlWriter
instanceof
ClassWriterImpl
)
{
htmlWriter
instanceof
ClassWriterImpl
)
{
//Automatically add link to constant values page for constant fields.
//Automatically add link to constant values page for constant fields.
result
=
addSeeHeader
(
result
);
result
=
addSeeHeader
(
result
);
result
+=
htmlWriter
.
getHyperLinkString
(
htmlWriter
.
relativePath
+
result
+=
htmlWriter
.
getHyperLinkString
(
htmlWriter
.
pathToRoot
.
resolve
(
ConfigurationImpl
.
CONSTANTS_FILE_NAME
DocPaths
.
CONSTANT_VALUES
),
+
"#"
+
((
ClassWriterImpl
)
htmlWriter
).
getClassDoc
().
qualifiedName
()
((
ClassWriterImpl
)
htmlWriter
).
getClassDoc
().
qualifiedName
()
+
"."
+
((
FieldDoc
)
holder
).
name
(),
+
"."
+
((
FieldDoc
)
holder
).
name
(),
htmlWriter
.
configuration
.
getText
(
"doclet.Constants_Summary"
));
htmlWriter
.
configuration
.
getText
(
"doclet.Constants_Summary"
)
,
false
);
}
}
if
(
holder
.
isClass
()
&&
((
ClassDoc
)
holder
).
isSerializable
())
{
if
(
holder
.
isClass
()
&&
((
ClassDoc
)
holder
).
isSerializable
())
{
//Automatically add link to serialized form page for serializable classes.
//Automatically add link to serialized form page for serializable classes.
if
((
SerializedFormBuilder
.
serialInclude
(
holder
)
&&
if
((
SerializedFormBuilder
.
serialInclude
(
holder
)
&&
SerializedFormBuilder
.
serialInclude
(((
ClassDoc
)
holder
).
containingPackage
())))
{
SerializedFormBuilder
.
serialInclude
(((
ClassDoc
)
holder
).
containingPackage
())))
{
result
=
addSeeHeader
(
result
);
result
=
addSeeHeader
(
result
);
result
+=
htmlWriter
.
getHyperLinkString
(
htmlWriter
.
relativePath
+
"serialized-form.html"
,
result
+=
htmlWriter
.
getHyperLinkString
(
htmlWriter
.
pathToRoot
.
resolve
(
DocPaths
.
SERIALIZED_FORM
)
,
((
ClassDoc
)
holder
).
qualifiedName
(),
htmlWriter
.
configuration
.
getText
(
"doclet.Serialized_Form"
),
false
);
((
ClassDoc
)
holder
).
qualifiedName
(),
htmlWriter
.
configuration
.
getText
(
"doclet.Serialized_Form"
),
false
);
}
}
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java
浏览文件 @
17c3050f
...
@@ -67,7 +67,7 @@ public class TreeWriter extends AbstractTreeWriter {
...
@@ -67,7 +67,7 @@ public class TreeWriter extends AbstractTreeWriter {
* @param classtree the tree being built.
* @param classtree the tree being built.
*/
*/
public
TreeWriter
(
ConfigurationImpl
configuration
,
public
TreeWriter
(
ConfigurationImpl
configuration
,
String
filename
,
ClassTree
classtree
)
DocPath
filename
,
ClassTree
classtree
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
filename
,
classtree
);
super
(
configuration
,
filename
,
classtree
);
packages
=
configuration
.
packages
;
packages
=
configuration
.
packages
;
...
@@ -84,7 +84,7 @@ public class TreeWriter extends AbstractTreeWriter {
...
@@ -84,7 +84,7 @@ public class TreeWriter extends AbstractTreeWriter {
public
static
void
generate
(
ConfigurationImpl
configuration
,
public
static
void
generate
(
ConfigurationImpl
configuration
,
ClassTree
classtree
)
{
ClassTree
classtree
)
{
TreeWriter
treegen
;
TreeWriter
treegen
;
String
filename
=
"overview-tree.html"
;
DocPath
filename
=
DocPaths
.
OVERVIEW_TREE
;
try
{
try
{
treegen
=
new
TreeWriter
(
configuration
,
filename
,
classtree
);
treegen
=
new
TreeWriter
(
configuration
,
filename
,
classtree
);
treegen
.
generateTreeFile
();
treegen
.
generateTreeFile
();
...
@@ -144,7 +144,7 @@ public class TreeWriter extends AbstractTreeWriter {
...
@@ -144,7 +144,7 @@ public class TreeWriter extends AbstractTreeWriter {
(
configuration
.
nodeprecated
&&
Util
.
isDeprecated
(
packages
[
i
])))
{
(
configuration
.
nodeprecated
&&
Util
.
isDeprecated
(
packages
[
i
])))
{
continue
;
continue
;
}
}
String
link
=
pathString
(
packages
[
i
],
"package-tree.html"
);
DocPath
link
=
pathString
(
packages
[
i
],
DocPaths
.
PACKAGE_TREE
);
Content
li
=
HtmlTree
.
LI
(
getHyperLink
(
Content
li
=
HtmlTree
.
LI
(
getHyperLink
(
link
,
""
,
new
StringContent
(
packages
[
i
].
name
())));
link
,
""
,
new
StringContent
(
packages
[
i
].
name
())));
if
(
i
<
packages
.
length
-
1
)
{
if
(
i
<
packages
.
length
-
1
)
{
...
...
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
浏览文件 @
17c3050f
...
@@ -31,6 +31,8 @@ import java.util.*;
...
@@ -31,6 +31,8 @@ import java.util.*;
import
com.sun.javadoc.*
;
import
com.sun.javadoc.*
;
import
com.sun.tools.doclets.formats.html.ConfigurationImpl
;
import
com.sun.tools.doclets.formats.html.ConfigurationImpl
;
import
com.sun.tools.doclets.internal.toolkit.*
;
import
com.sun.tools.doclets.internal.toolkit.*
;
import
com.sun.tools.doclets.internal.toolkit.util.DocPath
;
import
com.sun.tools.doclets.internal.toolkit.util.DocPaths
;
/**
/**
...
@@ -56,25 +58,11 @@ public abstract class HtmlDocWriter extends HtmlWriter {
...
@@ -56,25 +58,11 @@ public abstract class HtmlDocWriter extends HtmlWriter {
*
*
* @param filename String file name.
* @param filename String file name.
*/
*/
public
HtmlDocWriter
(
Configuration
configuration
,
public
HtmlDocWriter
(
Configuration
configuration
,
DocPath
filename
)
String
filename
)
throws
IOException
{
throws
IOException
{
super
(
configuration
,
super
(
configuration
,
filename
);
null
,
configuration
.
destDirName
+
filename
,
configuration
.
docencoding
);
// use File to normalize file separators
configuration
.
message
.
notice
(
"doclet.Generating_0"
,
configuration
.
message
.
notice
(
"doclet.Generating_0"
,
new
File
(
configuration
.
destDirName
,
filename
));
filename
.
resolveAgainst
(
configuration
.
destDirName
));
}
public
HtmlDocWriter
(
Configuration
configuration
,
String
path
,
String
filename
)
throws
IOException
{
super
(
configuration
,
configuration
.
destDirName
+
path
,
filename
,
configuration
.
docencoding
);
// use File to normalize file separators
configuration
.
message
.
notice
(
"doclet.Generating_0"
,
new
File
(
configuration
.
destDirName
,
((
path
.
length
()
>
0
)?
path
+
File
.
separator
:
""
)
+
filename
));
}
}
/**
/**
...
@@ -92,7 +80,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
...
@@ -92,7 +80,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param strong Boolean that sets label to strong.
* @param strong Boolean that sets label to strong.
* @return String Hyper Link.
* @return String Hyper Link.
*/
*/
public
String
getHyperLinkString
(
String
link
,
String
where
,
public
String
getHyperLinkString
(
DocPath
link
,
String
where
,
String
label
,
boolean
strong
)
{
String
label
,
boolean
strong
)
{
return
getHyperLinkString
(
link
,
where
,
label
,
strong
,
""
,
""
,
""
);
return
getHyperLinkString
(
link
,
where
,
label
,
strong
,
""
,
""
,
""
);
}
}
...
@@ -108,12 +96,25 @@ public abstract class HtmlDocWriter extends HtmlWriter {
...
@@ -108,12 +96,25 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param stylename String style of text defined in style sheet.
* @param stylename String style of text defined in style sheet.
* @return String Hyper Link.
* @return String Hyper Link.
*/
*/
public
String
getHyperLinkString
(
String
link
,
String
where
,
public
String
getHyperLinkString
(
DocPath
link
,
String
where
,
String
label
,
boolean
strong
,
String
label
,
boolean
strong
,
String
stylename
)
{
String
stylename
)
{
return
getHyperLinkString
(
link
,
where
,
label
,
strong
,
stylename
,
""
,
""
);
return
getHyperLinkString
(
link
,
where
,
label
,
strong
,
stylename
,
""
,
""
);
}
}
/**
* Get Html Hyper Link string.
*
* @param where Position of the link in the file. Character '#' is not
* needed.
* @param label Tag for the link.
* @return a content tree for the hyper link
*/
public
Content
getHyperLink
(
String
where
,
Content
label
)
{
return
getHyperLink
(
DocPath
.
empty
,
where
,
label
,
""
,
""
);
}
/**
/**
* Get Html Hyper Link string.
* Get Html Hyper Link string.
*
*
...
@@ -123,7 +124,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
...
@@ -123,7 +124,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param label Tag for the link.
* @param label Tag for the link.
* @return a content tree for the hyper link
* @return a content tree for the hyper link
*/
*/
public
Content
getHyperLink
(
String
link
,
String
where
,
public
Content
getHyperLink
(
DocPath
link
,
String
where
,
Content
label
)
{
Content
label
)
{
return
getHyperLink
(
link
,
where
,
label
,
""
,
""
);
return
getHyperLink
(
link
,
where
,
label
,
""
,
""
);
}
}
...
@@ -141,6 +142,13 @@ public abstract class HtmlDocWriter extends HtmlWriter {
...
@@ -141,6 +142,13 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param target Target frame.
* @param target Target frame.
* @return String Hyper Link.
* @return String Hyper Link.
*/
*/
public
String
getHyperLinkString
(
DocPath
link
,
String
where
,
String
label
,
boolean
strong
,
String
stylename
,
String
title
,
String
target
)
{
return
getHyperLinkString
(
link
.
getPath
(),
where
,
label
,
strong
,
stylename
,
title
,
target
);
}
public
String
getHyperLinkString
(
String
link
,
String
where
,
public
String
getHyperLinkString
(
String
link
,
String
where
,
String
label
,
boolean
strong
,
String
label
,
boolean
strong
,
String
stylename
,
String
title
,
String
target
)
{
String
stylename
,
String
title
,
String
target
)
{
...
@@ -189,8 +197,13 @@ public abstract class HtmlDocWriter extends HtmlWriter {
...
@@ -189,8 +197,13 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param target Target frame.
* @param target Target frame.
* @return a content tree for the hyper link.
* @return a content tree for the hyper link.
*/
*/
public
Content
getHyperLink
(
DocPath
link
,
String
where
,
Content
label
,
String
title
,
String
target
)
{
return
getHyperLink
(
link
.
getPath
(),
where
,
label
,
title
,
target
);
}
public
Content
getHyperLink
(
String
link
,
String
where
,
public
Content
getHyperLink
(
String
link
,
String
where
,
Content
label
,
String
title
,
String
target
)
{
Content
label
,
String
title
,
String
target
)
{
if
(
link
.
startsWith
(
"/"
))
Thread
.
dumpStack
();
if
(
where
!=
null
&&
where
.
length
()
!=
0
)
{
if
(
where
!=
null
&&
where
.
length
()
!=
0
)
{
link
+=
"#"
+
where
;
link
+=
"#"
+
where
;
}
}
...
@@ -211,7 +224,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
...
@@ -211,7 +224,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param label Label for the link
* @param label Label for the link
* @return a content for the hyperlink to the file
* @return a content for the hyperlink to the file
*/
*/
public
Content
getHyperLink
(
String
link
,
Content
label
)
{
public
Content
getHyperLink
(
DocPath
link
,
Content
label
)
{
return
getHyperLink
(
link
,
""
,
label
);
return
getHyperLink
(
link
,
""
,
label
);
}
}
...
@@ -222,7 +235,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
...
@@ -222,7 +235,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param label Tag for the link.
* @param label Tag for the link.
* @return Strign Hyper link.
* @return Strign Hyper link.
*/
*/
public
String
getHyperLinkString
(
String
link
,
String
label
)
{
public
String
getHyperLinkString
(
DocPath
link
,
String
label
)
{
return
getHyperLinkString
(
link
,
""
,
label
,
false
);
return
getHyperLinkString
(
link
,
""
,
label
,
false
);
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
浏览文件 @
17c3050f
...
@@ -46,22 +46,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
...
@@ -46,22 +46,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
*/
*/
public
class
HtmlWriter
{
public
class
HtmlWriter
{
/**
* Name of the file, to which this writer is writing to.
*/
protected
final
String
htmlFilename
;
/**
/**
* The window title of this file
* The window title of this file
*/
*/
protected
String
winTitle
;
protected
String
winTitle
;
/**
* URL file separator string("/").
*/
public
static
final
String
fileseparator
=
DirectoryManager
.
URL_FILE_SEPARATOR
;
/**
/**
* The configuration
* The configuration
*/
*/
...
@@ -162,18 +151,15 @@ public class HtmlWriter {
...
@@ -162,18 +151,15 @@ public class HtmlWriter {
* or null if none to be created.
* or null if none to be created.
* @param filename File Name to which the PrintWriter will
* @param filename File Name to which the PrintWriter will
* do the Output.
* do the Output.
* @param docencoding Encoding to be used for this file.
* @exception IOException Exception raised by the FileWriter is passed on
* @exception IOException Exception raised by the FileWriter is passed on
* to next level.
* to next level.
* @exception UnsupportedEncodingException Exception raised by the
* @exception UnsupportedEncodingException Exception raised by the
* OutputStreamWriter is passed on to next level.
* OutputStreamWriter is passed on to next level.
*/
*/
public
HtmlWriter
(
Configuration
configuration
,
public
HtmlWriter
(
Configuration
configuration
,
DocPath
path
)
String
path
,
String
filename
,
String
docencoding
)
throws
IOException
,
UnsupportedEncodingException
{
throws
IOException
,
UnsupportedEncodingException
{
writer
=
Util
.
genWriter
(
configuration
,
path
);
writer
=
Util
.
genWriter
(
configuration
,
path
,
filename
,
docencoding
);
this
.
configuration
=
configuration
;
this
.
configuration
=
configuration
;
htmlFilename
=
filename
;
this
.
memberDetailsListPrinted
=
false
;
this
.
memberDetailsListPrinted
=
false
;
packageTableHeader
=
new
String
[]
{
packageTableHeader
=
new
String
[]
{
configuration
.
getText
(
"doclet.Package"
),
configuration
.
getText
(
"doclet.Package"
),
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
浏览文件 @
17c3050f
...
@@ -130,8 +130,8 @@ public abstract class AbstractDoclet {
...
@@ -130,8 +130,8 @@ public abstract class AbstractDoclet {
boolean
first
=
true
;
boolean
first
=
true
;
while
(
pathTokens
.
hasMoreTokens
()){
while
(
pathTokens
.
hasMoreTokens
()){
Util
.
copyDocFiles
(
configuration
,
Util
.
copyDocFiles
(
configuration
,
pathTokens
.
nextToken
()
+
File
.
separator
,
new
File
(
pathTokens
.
nextToken
())
,
Doc
letConstants
.
DOC_FILES_DIR_NAME
,
first
);
Doc
Paths
.
DOC_FILES
,
first
);
first
=
false
;
first
=
false
;
}
}
}
}
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java
浏览文件 @
17c3050f
...
@@ -44,13 +44,6 @@ import com.sun.javadoc.*;
...
@@ -44,13 +44,6 @@ import com.sun.javadoc.*;
public
interface
PackageSummaryWriter
{
public
interface
PackageSummaryWriter
{
/**
* Return the name of the output file.
*
* @return the name of the output file.
*/
public
abstract
String
getOutputFileName
();
/**
/**
* Get the header for the summary.
* Get the header for the summary.
*
*
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
浏览文件 @
17c3050f
...
@@ -141,11 +141,9 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
...
@@ -141,11 +141,9 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
//documented AND if we have not documented a class from the same
//documented AND if we have not documented a class from the same
//package already. Otherwise, we are making duplicate copies.
//package already. Otherwise, we are making duplicate copies.
Util
.
copyDocFiles
(
configuration
,
Util
.
copyDocFiles
(
configuration
,
Util
.
getPackageSourcePath
(
configuration
,
new
File
(
Util
.
getPackageSourcePath
(
configuration
,
containingPackage
),
annotationTypeDoc
.
containingPackage
())
+
DocPath
.
forPackage
(
annotationTypeDoc
).
getPath
()),
DirectoryManager
.
getDirectoryPath
(
DocPaths
.
DOC_FILES
,
true
);
annotationTypeDoc
.
containingPackage
())
+
File
.
separator
,
DocletConstants
.
DOC_FILES_DIR_NAME
,
true
);
containingPackagesSeen
.
add
(
containingPackage
.
name
());
containingPackagesSeen
.
add
(
containingPackage
.
name
());
}
}
}
}
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
浏览文件 @
17c3050f
...
@@ -267,10 +267,9 @@ public class ClassBuilder extends AbstractBuilder {
...
@@ -267,10 +267,9 @@ public class ClassBuilder extends AbstractBuilder {
//documented AND if we have not documented a class from the same
//documented AND if we have not documented a class from the same
//package already. Otherwise, we are making duplicate copies.
//package already. Otherwise, we are making duplicate copies.
Util
.
copyDocFiles
(
configuration
,
Util
.
copyDocFiles
(
configuration
,
Util
.
getPackageSourcePath
(
configuration
,
new
File
(
Util
.
getPackageSourcePath
(
configuration
,
containingPackage
),
classDoc
.
containingPackage
())
+
DocPath
.
forPackage
(
classDoc
).
getPath
()),
DirectoryManager
.
getDirectoryPath
(
classDoc
.
containingPackage
())
DocPaths
.
DOC_FILES
,
true
);
+
File
.
separator
,
DocletConstants
.
DOC_FILES_DIR_NAME
,
true
);
containingPackagesSeen
.
add
(
containingPackage
.
name
());
containingPackagesSeen
.
add
(
containingPackage
.
name
());
}
}
}
}
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
浏览文件 @
17c3050f
...
@@ -122,9 +122,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
...
@@ -122,9 +122,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
Util
.
copyDocFiles
(
Util
.
copyDocFiles
(
configuration
,
configuration
,
Util
.
getPackageSourcePath
(
configuration
,
packageDoc
),
Util
.
getPackageSourcePath
(
configuration
,
packageDoc
),
DirectoryManager
.
getDirectoryPath
(
packageDoc
)
DocPath
.
forPackage
(
packageDoc
).
resolve
(
DocPaths
.
DOC_FILES
),
+
File
.
separator
+
DocletConstants
.
DOC_FILES_DIR_NAME
,
true
);
true
);
}
}
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
浏览文件 @
17c3050f
...
@@ -474,6 +474,8 @@ public class SerializedFormBuilder extends AbstractBuilder {
...
@@ -474,6 +474,8 @@ public class SerializedFormBuilder extends AbstractBuilder {
Arrays
.
sort
(
tags
);
Arrays
.
sort
(
tags
);
int
tagsLength
=
tags
.
length
;
int
tagsLength
=
tags
.
length
;
for
(
int
i
=
0
;
i
<
tagsLength
;
i
++)
{
for
(
int
i
=
0
;
i
<
tagsLength
;
i
++)
{
if
(
tags
[
i
].
fieldName
()
==
null
||
tags
[
i
].
fieldType
()
==
null
)
// ignore malformed @serialField tags
continue
;
Content
fieldsContentTree
=
fieldWriter
.
getFieldsContentHeader
(
Content
fieldsContentTree
=
fieldWriter
.
getFieldsContentHeader
(
(
i
==
tagsLength
-
1
));
(
i
==
tagsLength
-
1
));
fieldWriter
.
addMemberHeader
(
tags
[
i
].
fieldTypeDoc
(),
fieldWriter
.
addMemberHeader
(
tags
[
i
].
fieldTypeDoc
(),
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DirectoryManager.java
已删除
100644 → 0
浏览文件 @
f1f39f49
/*
* Copyright (c) 1998, 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* 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
com.sun.tools.doclets.internal.toolkit.util
;
import
com.sun.tools.doclets.internal.toolkit.*
;
import
com.sun.javadoc.*
;
import
java.io.*
;
/**
* Handle the directory creations and the path string generations.
* All static - never instaniated.
*
* This code is not part of an API.
* It is implementation that is subject to change.
* Do not use it as an API
*
* @since 1.2
* @author Atul M Dambalkar
*/
public
class
DirectoryManager
{
/**
* The file separator string, "/", used in the formation of the URL path.
*/
public
static
final
String
URL_FILE_SEPARATOR
=
"/"
;
/**
* Never instaniated.
*/
private
DirectoryManager
()
{
}
/**
* Given a PackageDoc, return its URL path string.
*
* @param pd PackageDoc
* @see #getPath(String)
*/
public
static
String
createPathString
(
PackageDoc
pd
)
{
if
(
pd
==
null
)
{
return
""
;
}
return
getPath
(
pd
.
name
());
}
/**
* Given a ClassDoc, return its URL path string.
*
* @param cd ClassDoc
* @see #getPath(String)
*/
public
static
String
createPathString
(
ClassDoc
cd
)
{
if
(
cd
==
null
)
{
return
""
;
}
PackageDoc
pd
=
cd
.
containingPackage
();
return
(
pd
==
null
)?
""
:
getPath
(
pd
.
name
());
}
/**
* Given a PackageDoc, return the corresponding directory name
* with the platform-dependent file separator between subdirectory names.
* For example, if name of the package is "java.lang" , then it
* returns "java/lang" on Unix and "java\lang" on Windows.
* If name of the package contains no dot, then the value
* will be returned unchanged. Because package names cannot
* end in a dot, the return value will never end with a slash.
* <p>
* Also see getPath for the URL separator version of this method
* that takes a string instead of a PackageDoc.
*
* @param pd the PackageDoc
* @return the platform-dependent directory path for the package
*/
public
static
String
getDirectoryPath
(
PackageDoc
pd
)
{
return
pd
==
null
||
pd
.
name
().
length
()
==
0
?
""
:
getDirectoryPath
(
pd
.
name
());
}
/**
* Given a package name, return the corresponding directory name
* with the platform-dependent file separator between subdirectory names.
* For example, if name of the package is "java.lang" , then it
* returns "java/lang" on Unix and "java\lang" on Windows.
* If name of the package contains no dot, then the value
* will be returned unchanged. Because package names cannot
* end in a dot, the return value will never end with a slash.
* <p>
* Also see getPath for the URL separator version of this method
* that takes a string instead of a PackageDoc.
*
* @param packageName the name of the package
* @return the platform-dependent directory path for the package
*/
public
static
String
getDirectoryPath
(
String
packageName
)
{
if
(
packageName
==
null
||
packageName
.
length
()
==
0
)
{
return
""
;
}
StringBuilder
pathstr
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
packageName
.
length
();
i
++)
{
char
ch
=
packageName
.
charAt
(
i
);
if
(
ch
==
'.'
)
{
pathstr
.
append
(
URL_FILE_SEPARATOR
);
}
else
{
pathstr
.
append
(
ch
);
}
}
if
(
pathstr
.
length
()
>
0
&&
!
pathstr
.
toString
().
endsWith
(
URL_FILE_SEPARATOR
))
{
pathstr
.
append
(
URL_FILE_SEPARATOR
);
}
return
pathstr
.
toString
();
}
/**
* Given a package name (a string), return the path string,
* with the URL separator "/" separating the subdirectory names.
* If name of the package contains no dot, then the value
* will be returned unchanged. Because package names cannot
* end in a dot, the return value will never end with a slash.
* <p>
* For example if the string is "com.sun.javadoc" then the URL
* path string will be "com/sun/javadoc".
*
* @param name the package name as a String
* @return the String URL path
*/
public
static
String
getPath
(
String
name
)
{
if
(
name
==
null
||
name
.
length
()
==
0
)
{
return
""
;
}
StringBuilder
pathstr
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
name
.
length
();
i
++)
{
char
ch
=
name
.
charAt
(
i
);
if
(
ch
==
'.'
)
{
pathstr
.
append
(
URL_FILE_SEPARATOR
);
}
else
{
pathstr
.
append
(
ch
);
}
}
return
pathstr
.
toString
();
}
/**
* Given two package names as strings, return the relative path
* from the package directory corresponding to the first string
* to the package directory corresponding to the second string,
* with the URL file separator "/" separating subdirectory names.
* <p>
* For example, if the parameter "from" is "java.lang"
* and parameter "to" is "java.applet", return string
* "../../java/applet".
*
* @param from the package name from which path is calculated
* @param to the package name to which path is calculated
* @return relative path between "from" and "to" with URL
* separators
* @see #getRelativePath(String)
* @see #getPath(String)
*/
public
static
String
getRelativePath
(
String
from
,
String
to
)
{
StringBuilder
pathstr
=
new
StringBuilder
();
pathstr
.
append
(
getRelativePath
(
from
));
pathstr
.
append
(
getPath
(
to
));
pathstr
.
append
(
URL_FILE_SEPARATOR
);
return
pathstr
.
toString
();
}
/**
* Given a package name as a string, return relative path string
* from the corresponding package directory to the root of
* the documentation, using the URL separator "/" between
* subdirectory names.
* <p>
* For example, if the string "from" is "java.lang",
* return "../../"
*
* @param from the package
* @return String relative path from "from".
* @see #getRelativePath(String, String)
*/
public
static
String
getRelativePath
(
PackageDoc
from
)
{
return
from
==
null
||
from
.
name
().
length
()
==
0
?
""
:
getRelativePath
(
from
.
name
());
}
/**
* Given a package name as a string, return relative path string
* from the corresponding package directory to the root of
* the documentation, using the URL separator "/" between
* subdirectory names.
* <p>
* For example, if the string "from" is "java.lang",
* return "../../"
*
* @param from the package name
* @return String relative path from "from".
* @see #getRelativePath(String, String)
*/
public
static
String
getRelativePath
(
String
from
)
{
if
(
from
==
null
||
from
.
length
()
==
0
)
{
return
""
;
}
StringBuilder
pathstr
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
from
.
length
();
i
++)
{
char
ch
=
from
.
charAt
(
i
);
if
(
ch
==
'.'
)
{
pathstr
.
append
(
".."
+
URL_FILE_SEPARATOR
);
}
}
pathstr
.
append
(
".."
+
URL_FILE_SEPARATOR
);
return
pathstr
.
toString
();
}
/**
* Given a relative or absolute path that might be empty,
* convert it to a path that does not end with a
* URL separator "/". Used for converting
* HtmlStandardWriter.relativepath when replacing {@docRoot}.
*
* @param path the path to convert. An empty path represents
* the current directory.
*/
public
static
String
getPathNoTrailingSlash
(
String
path
)
{
if
(
path
.
equals
(
""
)
)
{
return
"."
;
}
if
(
path
.
equals
(
"/"
)
)
{
return
"/."
;
}
if
(
path
.
endsWith
(
"/"
)
)
{
// Remove trailing slash
path
=
path
.
substring
(
0
,
path
.
length
()
-
1
);
}
return
path
;
}
/**
* Given a path string create all the directories in the path. For example,
* if the path string is "java/applet", the method will create directory
* "java" and then "java/applet" if they don't exist. The file separator
* string "/" is platform dependent system property.
*
* @param path Directory path string.
*/
public
static
void
createDirectory
(
Configuration
configuration
,
String
path
)
{
if
(
path
==
null
||
path
.
length
()
==
0
)
{
return
;
}
File
dir
=
new
File
(
path
);
if
(
dir
.
exists
())
{
return
;
}
else
{
if
(
dir
.
mkdirs
())
{
return
;
}
else
{
configuration
.
message
.
error
(
"doclet.Unable_to_create_directory_0"
,
path
);
throw
new
DocletAbortException
();
}
}
}
/**
* Given a package name and a file name, return the full path to that file.
* For example, if PackageDoc passed is for "java.lang" and the filename
* passed is "package-summary.html", then the string returned is
* "java/lang/package-summary.html".
*
* @param pd PackageDoc.
* @param filename File name to be appended to the path of the package.
*/
public
static
String
getPathToPackage
(
PackageDoc
pd
,
String
filename
)
{
StringBuilder
buf
=
new
StringBuilder
();
String
pathstr
=
createPathString
(
pd
);
if
(
pathstr
.
length
()
>
0
)
{
buf
.
append
(
pathstr
);
buf
.
append
(
URL_FILE_SEPARATOR
);
}
buf
.
append
(
filename
);
return
buf
.
toString
();
}
/**
* Given a class name return the full path to the class file.
* For example, if ClassDoc passed is for "java.lang.Object" then the
* string returned is "java/lang/Object.html".
*
* @param cd ClassDoc.
*/
public
static
String
getPathToClass
(
ClassDoc
cd
)
{
return
getPathToPackage
(
cd
.
containingPackage
(),
cd
.
name
()
+
".html"
);
}
}
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocPath.java
0 → 100644
浏览文件 @
17c3050f
/*
* Copyright (c) 1998, 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* 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
com.sun.tools.doclets.internal.toolkit.util
;
import
com.sun.javadoc.ClassDoc
;
import
com.sun.javadoc.PackageDoc
;
import
java.io.File
;
/**
* Abstraction for immutable relative paths.
* Paths always use '/' as a separator, and never begin or end with '/'.
*/
public
class
DocPath
{
private
final
String
path
;
/** The empty path. */
public
static
final
DocPath
empty
=
new
DocPath
(
""
);
/** The empty path. */
public
static
final
DocPath
parent
=
new
DocPath
(
".."
);
/**
* Create a path from a string.
*/
public
static
DocPath
create
(
String
p
)
{
return
(
p
==
null
)
||
p
.
isEmpty
()
?
empty
:
new
DocPath
(
p
);
}
/**
* Return the path for a class.
* For example, if the class is java.lang.Object,
* the path is java/lang/Object.html.
*/
public
static
DocPath
forClass
(
ClassDoc
cd
)
{
return
(
cd
==
null
)
?
empty
:
forPackage
(
cd
.
containingPackage
()).
resolve
(
forName
(
cd
));
}
/**
* Return the path for the simple name of the class.
* For example, if the class is java.lang.Object,
* the path is Object.html.
*/
public
static
DocPath
forName
(
ClassDoc
cd
)
{
return
(
cd
==
null
)
?
empty
:
new
DocPath
(
cd
.
name
()
+
".html"
);
}
/**
* Return the path for the package of a class.
* For example, if the class is java.lang.Object,
* the path is java/lang.
*/
public
static
DocPath
forPackage
(
ClassDoc
cd
)
{
return
(
cd
==
null
)
?
empty
:
forPackage
(
cd
.
containingPackage
());
}
/**
* Return the path for a package.
* For example, if the package is java.lang,
* the path is java/lang.
*/
public
static
DocPath
forPackage
(
PackageDoc
pd
)
{
return
(
pd
==
null
)
?
empty
:
DocPath
.
create
(
pd
.
name
().
replace
(
'.'
,
'/'
));
}
/**
* Return the inverse path for a package.
* For example, if the package is java.lang,
* the inverse path is ../...
*/
public
static
DocPath
forRoot
(
PackageDoc
pd
)
{
String
name
=
(
pd
==
null
)
?
""
:
pd
.
name
();
if
(
name
.
isEmpty
())
return
empty
;
return
new
DocPath
(
name
.
replace
(
'.'
,
'/'
).
replaceAll
(
"[^/]+"
,
".."
));
}
/**
* Return the relative path from one package to another.
*/
public
static
DocPath
relativePath
(
PackageDoc
from
,
PackageDoc
to
)
{
return
forRoot
(
from
).
resolve
(
forPackage
(
to
));
}
protected
DocPath
(
String
p
)
{
path
=
(
p
.
endsWith
(
"/"
)
?
p
.
substring
(
0
,
p
.
length
()
-
1
)
:
p
);
}
/** @inheritDoc */
@Override
public
boolean
equals
(
Object
other
)
{
return
(
other
instanceof
DocPath
)
&&
path
.
equals
(((
DocPath
)
other
).
path
);
}
/** @inheritDoc */
@Override
public
int
hashCode
()
{
return
path
.
hashCode
();
}
public
DocPath
basename
()
{
int
sep
=
path
.
lastIndexOf
(
"/"
);
return
(
sep
==
-
1
)
?
this
:
new
DocPath
(
path
.
substring
(
sep
+
1
));
}
public
DocPath
parent
()
{
int
sep
=
path
.
lastIndexOf
(
"/"
);
return
(
sep
==
-
1
)
?
empty
:
new
DocPath
(
path
.
substring
(
0
,
sep
));
}
/**
* Return the path formed by appending the specified string to the current path.
*/
public
DocPath
resolve
(
String
p
)
{
if
(
p
==
null
||
p
.
isEmpty
())
return
this
;
if
(
path
.
isEmpty
())
return
new
DocPath
(
p
);
return
new
DocPath
(
path
+
"/"
+
p
);
}
/**
* Return the path by appending the specified path to the current path.
*/
public
DocPath
resolve
(
DocPath
p
)
{
if
(
p
==
null
||
p
.
isEmpty
())
return
this
;
if
(
path
.
isEmpty
())
return
p
;
return
new
DocPath
(
path
+
"/"
+
p
.
getPath
());
}
/**
* Get the file created by evaluating the path against a specified directory.
*/
// Temporary: this signature should not use String for dir.
// Eventually, this should involve javax.tools.Location.
public
File
resolveAgainst
(
String
dir
)
{
return
dir
.
isEmpty
()
?
new
File
(
path
)
:
new
File
(
dir
,
path
);
}
/**
* Return the inverse path for this path.
* For example, if the path is a/b/c, the inverse path is ../../..
*/
public
DocPath
invert
()
{
return
new
DocPath
(
path
.
replaceAll
(
"[^/]+"
,
".."
));
}
/**
* Return true if this path is empty.
*/
public
boolean
isEmpty
()
{
return
path
.
isEmpty
();
}
/**
* Return this path as a string.
*/
// This is provided instead of using toString() to help catch
// unintended use of toString() in string concatenation sequences.
public
String
getPath
()
{
return
path
;
}
}
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocPaths.java
0 → 100644
浏览文件 @
17c3050f
/*
* Copyright (c) 1998, 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* 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
com.sun.tools.doclets.internal.toolkit.util
;
/**
* Standard DocPath objects.
*
* @since 8
*/
public
class
DocPaths
{
/** The name of the file for all classes, using frames. */
public
static
final
DocPath
ALLCLASSES_FRAME
=
DocPath
.
create
(
"allclasses-frame.html"
);
/** The name of the file for all classes, without using frames. */
public
static
final
DocPath
ALLCLASSES_NOFRAME
=
DocPath
.
create
(
"allclasses-noframe.html"
);
/** The name of the sub-directory for storing class usage info. */
public
static
final
DocPath
CLASS_USE
=
DocPath
.
create
(
"class-use"
);
/** The name of the file for constant values. */
public
static
final
DocPath
CONSTANT_VALUES
=
DocPath
.
create
(
"constant-values.html"
);
/** The name of the fie for deprecated elements. */
public
static
final
DocPath
DEPRECATED_LIST
=
DocPath
.
create
(
"deprecated-list.html"
);
/** The name of the subdirectory for user-provided additional documentation files. */
public
static
final
DocPath
DOC_FILES
=
DocPath
.
create
(
"doc-files"
);
/** The name of the file for help info. */
public
static
final
DocPath
HELP_DOC
=
DocPath
.
create
(
"help-doc.html"
);
/** The name of the main index file. */
public
static
final
DocPath
INDEX
=
DocPath
.
create
(
"index.html"
);
/** The name of the single index file for all classes. */
public
static
final
DocPath
INDEX_ALL
=
DocPath
.
create
(
"index-all.html"
);
/** The name of the directory for the split index files. */
public
static
final
DocPath
INDEX_FILES
=
DocPath
.
create
(
"index-files"
);
/** Generate the name of one of the files in the split index. */
public
static
final
DocPath
indexN
(
int
n
)
{
return
DocPath
.
create
(
"index-"
+
n
+
".html"
);
}
/** The name of the file for the overview frame. */
public
static
final
DocPath
OVERVIEW_FRAME
=
DocPath
.
create
(
"overview-frame.html"
);
/** The name of the file for the overview summary. */
public
static
final
DocPath
OVERVIEW_SUMMARY
=
DocPath
.
create
(
"overview-summary.html"
);
/** The name of the file for the overview tree. */
public
static
final
DocPath
OVERVIEW_TREE
=
DocPath
.
create
(
"overview-tree.html"
);
/** The name of the file for the package frame. */
public
static
final
DocPath
PACKAGE_FRAME
=
DocPath
.
create
(
"package-frame.html"
);
/** The name of the file for the package list. */
public
static
final
DocPath
PACKAGE_LIST
=
DocPath
.
create
(
"package-list"
);
/** The name of the file for the package summary. */
public
static
final
DocPath
PACKAGE_SUMMARY
=
DocPath
.
create
(
"package-summary.html"
);
/** The name of the file for the package tree. */
public
static
final
DocPath
PACKAGE_TREE
=
DocPath
.
create
(
"package-tree.html"
);
/** The name of the file for the package usage info. */
public
static
final
DocPath
PACKAGE_USE
=
DocPath
.
create
(
"package-use.html"
);
/** The name of the directory in which resources are generated.
* Also the name of the sub-package from which resources are read.
*/
public
static
final
DocPath
RESOURCES
=
DocPath
.
create
(
"resources"
);
/** The name of the file for the serialized form info. */
public
static
final
DocPath
SERIALIZED_FORM
=
DocPath
.
create
(
"serialized-form.html"
);
/** The name of the directory in which HTML versions of the source code
* are generated.
*/
public
static
final
DocPath
SOURCE_OUTPUT
=
DocPath
.
create
(
"src-html"
);
/** The name of the default stylesheet. */
public
static
final
DocPath
STYLESHEET
=
DocPath
.
create
(
"stylesheet.css"
);
}
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java
浏览文件 @
17c3050f
...
@@ -39,48 +39,28 @@ package com.sun.tools.doclets.internal.toolkit.util;
...
@@ -39,48 +39,28 @@ package com.sun.tools.doclets.internal.toolkit.util;
*/
*/
public
class
DocletConstants
{
public
class
DocletConstants
{
/**
* The default package name.
*/
public
static
final
String
DEFAULT_PACKAGE_NAME
=
"<Unnamed>"
;
/**
* The default package file name.
*/
public
static
final
String
DEFAULT_PACKAGE_FILE_NAME
=
"default"
;
/**
* The anchor for the default package.
*/
public
static
final
String
UNNAMED_PACKAGE_ANCHOR
=
"unnamed_package"
;
/**
* The name of the doc files directory.
*/
public
static
final
String
DOC_FILES_DIR_NAME
=
"doc-files"
;
/**
/**
* The default amount of space between tab stops.
* The default amount of space between tab stops.
*/
*/
public
static
final
int
DEFAULT_TAB_STOP_LENGTH
=
8
;
public
static
final
int
DEFAULT_TAB_STOP_LENGTH
=
8
;
/**
/**
* The
name of the directory where we will copy resource files to
.
* The
line separator for the current operating system
.
*/
*/
public
static
final
String
RESOURE_DIR_NAME
=
"resources"
;
public
static
final
String
NL
=
System
.
getProperty
(
"line.separator"
)
;
/**
/**
* The
source output directory name
* The
default package name.
*/
*/
public
static
final
String
SOURCE_OUTPUT_DIR_NAME
=
"src-html/
"
;
public
static
final
String
DEFAULT_PACKAGE_NAME
=
"<Unnamed>
"
;
/**
/**
* The
name of the package list fil
e.
* The
default package file nam
e.
*/
*/
public
static
final
String
PACKAGE_LIST_FILE_NAME
=
"package-lis
t"
;
public
static
final
String
DEFAULT_PACKAGE_FILE_NAME
=
"defaul
t"
;
/**
/**
* The
line seperator for the current operating system
.
* The
anchor for the default package
.
*/
*/
public
static
final
String
NL
=
System
.
getProperty
(
"line.separator"
)
;
public
static
final
String
UNNAMED_PACKAGE_ANCHOR
=
"unnamed_package"
;
}
}
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java
浏览文件 @
17c3050f
...
@@ -142,12 +142,15 @@ public class Extern {
...
@@ -142,12 +142,15 @@ public class Extern {
* @return if external return converted link else return null
* @return if external return converted link else return null
*/
*/
public
String
getExternalLink
(
String
pkgName
,
public
String
getExternalLink
(
String
pkgName
,
String
relativepath
,
String
link
)
{
DocPath
relativepath
,
String
link
)
{
Item
fnd
=
findPackageItem
(
pkgName
);
Item
fnd
=
findPackageItem
(
pkgName
);
if
(
fnd
!=
null
)
{
if
(
fnd
!=
null
)
{
String
externlink
=
fnd
.
path
+
link
;
String
externlink
=
fnd
.
path
+
link
;
if
(
fnd
.
relative
)
{
// it's a relative path.
if
(
fnd
.
relative
)
{
// it's a relative path.
return
relativepath
+
externlink
;
if
(
relativepath
.
isEmpty
())
return
externlink
;
else
return
relativepath
.
getPath
()
+
"/"
+
externlink
;
}
else
{
}
else
{
return
externlink
;
return
externlink
;
}
}
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java
浏览文件 @
17c3050f
...
@@ -52,8 +52,7 @@ public class PackageListWriter extends PrintWriter {
...
@@ -52,8 +52,7 @@ public class PackageListWriter extends PrintWriter {
* @param configuration the current configuration of the doclet.
* @param configuration the current configuration of the doclet.
*/
*/
public
PackageListWriter
(
Configuration
configuration
)
throws
IOException
{
public
PackageListWriter
(
Configuration
configuration
)
throws
IOException
{
super
(
Util
.
genWriter
(
configuration
,
configuration
.
destDirName
,
super
(
Util
.
genWriter
(
configuration
,
DocPaths
.
PACKAGE_LIST
));
DocletConstants
.
PACKAGE_LIST_FILE_NAME
,
configuration
.
docencoding
));
this
.
configuration
=
configuration
;
this
.
configuration
=
configuration
;
}
}
...
@@ -71,7 +70,7 @@ public class PackageListWriter extends PrintWriter {
...
@@ -71,7 +70,7 @@ public class PackageListWriter extends PrintWriter {
packgen
.
close
();
packgen
.
close
();
}
catch
(
IOException
exc
)
{
}
catch
(
IOException
exc
)
{
configuration
.
message
.
error
(
"doclet.exception_encountered"
,
configuration
.
message
.
error
(
"doclet.exception_encountered"
,
exc
.
toString
(),
Doc
letConstants
.
PACKAGE_LIST_FILE_NAME
);
exc
.
toString
(),
Doc
Paths
.
PACKAGE_LIST
);
throw
new
DocletAbortException
();
throw
new
DocletAbortException
();
}
}
}
}
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourcePath.java
浏览文件 @
17c3050f
/*
/*
* Copyright (c) 1998, 20
03
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -38,8 +38,7 @@ import java.io.File;
...
@@ -38,8 +38,7 @@ import java.io.File;
*
*
* @author Atul M Dambalkar
* @author Atul M Dambalkar
*/
*/
public
public
class
SourcePath
{
class
SourcePath
{
private
final
char
dirSeparator
=
File
.
pathSeparatorChar
;
private
final
char
dirSeparator
=
File
.
pathSeparatorChar
;
/**
/**
...
@@ -114,9 +113,9 @@ public
...
@@ -114,9 +113,9 @@ public
* @param name Name of the directory to be searched for in the source path.
* @param name Name of the directory to be searched for in the source path.
* @return File Return the directory if found else return null.
* @return File Return the directory if found else return null.
*/
*/
public
File
getDirectory
(
String
name
)
{
public
File
getDirectory
(
DocPath
p
)
{
for
(
int
i
=
0
;
i
<
sourcePath
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
sourcePath
.
length
;
i
++)
{
File
directoryNeeded
=
new
File
(
sourcePath
[
i
],
name
);
File
directoryNeeded
=
new
File
(
sourcePath
[
i
],
p
.
getPath
()
);
if
(
directoryNeeded
.
isDirectory
())
{
if
(
directoryNeeded
.
isDirectory
())
{
return
directoryNeeded
;
return
directoryNeeded
;
}
}
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
浏览文件 @
17c3050f
...
@@ -51,11 +51,6 @@ public class Util {
...
@@ -51,11 +51,6 @@ public class Util {
public
static
final
String
[][]
HTML_ESCAPE_CHARS
=
public
static
final
String
[][]
HTML_ESCAPE_CHARS
=
{{
"&"
,
"&"
},
{
"<"
,
"<"
},
{
">"
,
">"
}};
{{
"&"
,
"&"
},
{
"<"
,
"<"
},
{
">"
,
">"
}};
/**
* Name of the resource directory.
*/
public
static
final
String
RESOURCESDIR
=
"resources"
;
/**
/**
* Return array of class members whose documentation is to be generated.
* Return array of class members whose documentation is to be generated.
* If the member is deprecated do not include such a member in the
* If the member is deprecated do not include such a member in the
...
@@ -236,26 +231,20 @@ public class Util {
...
@@ -236,26 +231,20 @@ public class Util {
* @param overwrite Overwrite files if true.
* @param overwrite Overwrite files if true.
*/
*/
public
static
void
copyDocFiles
(
Configuration
configuration
,
public
static
void
copyDocFiles
(
Configuration
configuration
,
String
path
,
String
dir
,
boolean
overwrite
)
{
File
path
,
DocPath
dir
,
boolean
overwrite
)
{
if
(
checkCopyDocFilesErrors
(
configuration
,
path
,
dir
))
{
if
(
checkCopyDocFilesErrors
(
configuration
,
path
,
dir
))
{
return
;
return
;
}
}
String
destname
=
configuration
.
docFileDestDirName
;
File
srcdir
=
new
File
(
path
,
dir
.
getPath
());
File
srcdir
=
new
File
(
path
+
dir
);
File
destdir
=
new
File
(
configuration
.
docFileDestDirName
,
dir
.
getPath
());
if
(
destname
.
length
()
>
0
&&
!
destname
.
endsWith
(
DirectoryManager
.
URL_FILE_SEPARATOR
))
{
destname
+=
DirectoryManager
.
URL_FILE_SEPARATOR
;
}
String
dest
=
destname
+
dir
;
try
{
try
{
File
destdir
=
new
File
(
dest
);
createDirectory
(
configuration
,
destdir
);
DirectoryManager
.
createDirectory
(
configuration
,
dest
);
String
[]
files
=
srcdir
.
list
();
String
[]
files
=
srcdir
.
list
();
for
(
int
i
=
0
;
i
<
files
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
files
.
length
;
i
++)
{
File
srcfile
=
new
File
(
srcdir
,
files
[
i
]);
File
srcfile
=
new
File
(
srcdir
,
files
[
i
]);
File
destfile
=
new
File
(
destdir
,
files
[
i
]);
File
destfile
=
new
File
(
destdir
,
files
[
i
]);
if
(
srcfile
.
isFile
())
{
if
(
srcfile
.
isFile
())
{
if
(
destfile
.
exists
()
&&
!
overwrite
)
{
if
(
destfile
.
exists
()
&&
!
overwrite
)
{
configuration
.
message
.
warning
((
SourcePosition
)
null
,
configuration
.
message
.
warning
((
SourcePosition
)
null
,
"doclet.Copy_Overwrite_warning"
,
"doclet.Copy_Overwrite_warning"
,
srcfile
.
toString
(),
destdir
.
toString
());
srcfile
.
toString
(),
destdir
.
toString
());
...
@@ -265,12 +254,11 @@ public class Util {
...
@@ -265,12 +254,11 @@ public class Util {
srcfile
.
toString
(),
destdir
.
toString
());
srcfile
.
toString
(),
destdir
.
toString
());
Util
.
copyFile
(
destfile
,
srcfile
);
Util
.
copyFile
(
destfile
,
srcfile
);
}
}
}
else
if
(
srcfile
.
isDirectory
())
{
}
else
if
(
srcfile
.
isDirectory
())
{
if
(
configuration
.
copydocfilesubdirs
if
(
configuration
.
copydocfilesubdirs
&&
!
configuration
.
shouldExcludeDocFileDir
(
&&
!
configuration
.
shouldExcludeDocFileDir
(
srcfile
.
getName
())){
srcfile
.
getName
())){
copyDocFiles
(
configuration
,
path
,
dir
+
copyDocFiles
(
configuration
,
path
,
dir
.
resolve
(
files
[
i
]),
DirectoryManager
.
URL_FILE_SEPARATOR
+
srcfile
.
getName
(),
overwrite
);
overwrite
);
}
}
}
}
...
@@ -290,7 +278,7 @@ public class Util {
...
@@ -290,7 +278,7 @@ public class Util {
* @param dirName The original directory name to copy from.
* @param dirName The original directory name to copy from.
*/
*/
private
static
boolean
checkCopyDocFilesErrors
(
Configuration
configuration
,
private
static
boolean
checkCopyDocFilesErrors
(
Configuration
configuration
,
String
path
,
String
dirName
)
{
File
path
,
DocPath
dirName
)
{
if
((
configuration
.
sourcepath
==
null
||
configuration
.
sourcepath
.
length
()
==
0
)
&&
if
((
configuration
.
sourcepath
==
null
||
configuration
.
sourcepath
.
length
()
==
0
)
&&
(
configuration
.
destDirName
==
null
||
configuration
.
destDirName
.
length
()
==
0
))
{
(
configuration
.
destDirName
==
null
||
configuration
.
destDirName
.
length
()
==
0
))
{
//The destination path and source path are definitely equal.
//The destination path and source path are definitely equal.
...
@@ -309,7 +297,7 @@ public class Util {
...
@@ -309,7 +297,7 @@ public class Util {
}
}
}
}
//Make sure the doc-file being copied exists.
//Make sure the doc-file being copied exists.
File
srcdir
=
new
File
(
path
+
dirName
);
File
srcdir
=
new
File
(
path
,
dirName
.
getPath
()
);
if
(!
srcdir
.
exists
())
{
if
(!
srcdir
.
exists
())
{
return
true
;
return
true
;
}
}
...
@@ -330,8 +318,7 @@ public class Util {
...
@@ -330,8 +318,7 @@ public class Util {
*/
*/
public
static
void
copyResourceFile
(
Configuration
configuration
,
public
static
void
copyResourceFile
(
Configuration
configuration
,
String
resourcefile
,
boolean
overwrite
)
{
String
resourcefile
,
boolean
overwrite
)
{
String
destresourcesdir
=
configuration
.
destDirName
+
RESOURCESDIR
;
copyFile
(
configuration
,
resourcefile
,
DocPaths
.
RESOURCES
,
DocPaths
.
RESOURCES
,
copyFile
(
configuration
,
resourcefile
,
RESOURCESDIR
,
destresourcesdir
,
overwrite
,
false
);
overwrite
,
false
);
}
}
...
@@ -350,15 +337,24 @@ public class Util {
...
@@ -350,15 +337,24 @@ public class Util {
* @param replaceNewLine true if the newline needs to be replaced with platform-
* @param replaceNewLine true if the newline needs to be replaced with platform-
* specific newline.
* specific newline.
*/
*/
public
static
void
copyFile
(
Configuration
configuration
,
String
file
,
DocPath
source
,
DocPath
destination
,
boolean
overwrite
,
boolean
replaceNewLine
)
{
copyFile
(
configuration
,
file
,
source
.
getPath
(),
destination
.
getPath
(),
overwrite
,
replaceNewLine
);
}
public
static
void
copyFile
(
Configuration
configuration
,
String
file
,
String
source
,
public
static
void
copyFile
(
Configuration
configuration
,
String
file
,
String
source
,
String
destination
,
boolean
overwrite
,
boolean
replaceNewLine
)
{
String
destination
,
boolean
overwrite
,
boolean
replaceNewLine
)
{
DirectoryManager
.
createDirectory
(
configuration
,
destination
);
File
destdir
=
configuration
.
destDirName
.
isEmpty
()
?
File
destfile
=
new
File
(
destination
,
file
);
(
destination
.
isEmpty
()
?
null
:
new
File
(
destination
))
:
if
(
destfile
.
exists
()
&&
(!
overwrite
))
return
;
new
File
(
configuration
.
destDirName
,
destination
);
File
destfile
=
(
destdir
==
null
)
?
new
File
(
file
)
:
new
File
(
destdir
,
file
);
createDirectory
(
configuration
,
destfile
.
getParentFile
());
if
(
destfile
.
exists
()
&&
(!
overwrite
))
return
;
try
{
try
{
InputStream
in
=
Configuration
.
class
.
getResourceAsStream
(
InputStream
in
=
Configuration
.
class
.
getResourceAsStream
(
source
+
DirectoryManager
.
URL_FILE_SEPARATOR
+
file
);
source
+
'/'
+
file
);
if
(
in
==
null
)
return
;
if
(
in
==
null
)
return
;
OutputStream
out
=
new
FileOutputStream
(
destfile
);
OutputStream
out
=
new
FileOutputStream
(
destfile
);
try
{
try
{
if
(!
replaceNewLine
)
{
if
(!
replaceNewLine
)
{
...
@@ -395,27 +391,47 @@ public class Util {
...
@@ -395,27 +391,47 @@ public class Util {
}
}
}
}
/**
* Given a path string create all the directories in the path. For example,
* if the path string is "java/applet", the method will create directory
* "java" and then "java/applet" if they don't exist. The file separator
* string "/" is platform dependent system property.
*
* @param path Directory path string.
*/
public
static
void
createDirectory
(
Configuration
configuration
,
File
dir
)
{
if
(
dir
==
null
)
{
return
;
}
if
(
dir
.
exists
())
{
return
;
}
else
{
if
(
dir
.
mkdirs
())
{
return
;
}
else
{
configuration
.
message
.
error
(
"doclet.Unable_to_create_directory_0"
,
dir
.
getPath
());
throw
new
DocletAbortException
();
}
}
}
/**
/**
* Given a PackageDoc, return the source path for that package.
* Given a PackageDoc, return the source path for that package.
* @param configuration The Configuration for the current Doclet.
* @param configuration The Configuration for the current Doclet.
* @param pkgDoc The package to seach the path for.
* @param pkgDoc The package to sea
r
ch the path for.
* @return A string representing the path to the given package.
* @return A string representing the path to the given package.
*/
*/
public
static
String
getPackageSourcePath
(
Configuration
configuration
,
public
static
File
getPackageSourcePath
(
Configuration
configuration
,
PackageDoc
pkgDoc
){
PackageDoc
pkgDoc
)
{
try
{
DocPath
pkgPath
=
DocPath
.
forPackage
(
pkgDoc
);
String
pkgPath
=
DirectoryManager
.
getDirectoryPath
(
pkgDoc
);
File
pkgDir
=
new
SourcePath
(
configuration
.
sourcepath
).
getDirectory
(
pkgPath
);
String
completePath
=
new
SourcePath
(
configuration
.
sourcepath
).
if
(
pkgDir
==
null
)
getDirectory
(
pkgPath
)
+
DirectoryManager
.
URL_FILE_SEPARATOR
;
return
null
;
//Make sure that both paths are using the same separators.
//Make sure that both paths are using the same separators.
completePath
=
Util
.
replaceText
(
completePath
,
File
.
separator
,
String
completePath
=
Util
.
replaceText
(
pkgDir
.
getPath
(),
File
.
separator
,
"/"
);
DirectoryManager
.
URL_FILE_SEPARATOR
);
String
pathForPkg
=
completePath
.
substring
(
0
,
completePath
.
lastIndexOf
(
pkgPath
.
getPath
()));
pkgPath
=
Util
.
replaceText
(
pkgPath
,
File
.
separator
,
return
new
File
(
pathForPkg
);
DirectoryManager
.
URL_FILE_SEPARATOR
);
return
completePath
.
substring
(
0
,
completePath
.
lastIndexOf
(
pkgPath
));
}
catch
(
Exception
e
){
return
""
;
}
}
}
/**
/**
...
@@ -552,7 +568,7 @@ public class Util {
...
@@ -552,7 +568,7 @@ public class Util {
}
}
/**
/**
* Given a package, return it
'
s name.
* Given a package, return its name.
* @param packageDoc the package to check.
* @param packageDoc the package to check.
* @return the name of the given package.
* @return the name of the given package.
*/
*/
...
@@ -562,7 +578,7 @@ public class Util {
...
@@ -562,7 +578,7 @@ public class Util {
}
}
/**
/**
* Given a package, return it
'
s file name without the extension.
* Given a package, return its file name without the extension.
* @param packageDoc the package to check.
* @param packageDoc the package to check.
* @return the file name of the given package.
* @return the file name of the given package.
*/
*/
...
@@ -572,7 +588,7 @@ public class Util {
...
@@ -572,7 +588,7 @@ public class Util {
}
}
/**
/**
* Given a string, replace all occurr
a
ces of 'newStr' with 'oldStr'.
* Given a string, replace all occurr
en
ces of 'newStr' with 'oldStr'.
* @param originalStr the string to modify.
* @param originalStr the string to modify.
* @param oldStr the string to replace.
* @param oldStr the string to replace.
* @param newStr the string to insert in place of the old string.
* @param newStr the string to insert in place of the old string.
...
@@ -637,22 +653,15 @@ public class Util {
...
@@ -637,22 +653,15 @@ public class Util {
* @see java.io.FileOutputStream
* @see java.io.FileOutputStream
* @see java.io.OutputStreamWriter
* @see java.io.OutputStreamWriter
*/
*/
public
static
Writer
genWriter
(
Configuration
configuration
,
public
static
Writer
genWriter
(
Configuration
configuration
,
DocPath
path
)
String
path
,
String
filename
,
throws
IOException
,
UnsupportedEncodingException
{
String
docencoding
)
File
file
=
path
.
resolveAgainst
(
configuration
.
destDirName
);
throws
IOException
,
UnsupportedEncodingException
{
createDirectory
(
configuration
,
file
.
getParentFile
());
FileOutputStream
fos
;
FileOutputStream
fos
=
new
FileOutputStream
(
file
);
if
(
path
!=
null
)
{
if
(
configuration
.
docencoding
==
null
)
{
DirectoryManager
.
createDirectory
(
configuration
,
path
);
fos
=
new
FileOutputStream
(((
path
.
length
()
>
0
)?
path
+
File
.
separator
:
""
)
+
filename
);
}
else
{
fos
=
new
FileOutputStream
(
filename
);
}
if
(
docencoding
==
null
)
{
return
new
BufferedWriter
(
new
OutputStreamWriter
(
fos
));
return
new
BufferedWriter
(
new
OutputStreamWriter
(
fos
));
}
else
{
}
else
{
return
new
BufferedWriter
(
new
OutputStreamWriter
(
fos
,
docencoding
));
return
new
BufferedWriter
(
new
OutputStreamWriter
(
fos
,
configuration
.
docencoding
));
}
}
}
}
...
...
src/share/classes/com/sun/tools/javadoc/SerializedForm.java
浏览文件 @
17c3050f
...
@@ -237,6 +237,9 @@ class SerializedForm {
...
@@ -237,6 +237,9 @@ class SerializedForm {
SerialFieldTag
[]
sfTag
=
spfDoc
.
serialFieldTags
();
SerialFieldTag
[]
sfTag
=
spfDoc
.
serialFieldTags
();
for
(
int
i
=
0
;
i
<
sfTag
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
sfTag
.
length
;
i
++)
{
if
(
sfTag
[
i
].
fieldName
()
==
null
||
sfTag
[
i
].
fieldType
()
==
null
)
// ignore malformed @serialField tags
continue
;
Name
fieldName
=
names
.
fromString
(
sfTag
[
i
].
fieldName
());
Name
fieldName
=
names
.
fromString
(
sfTag
[
i
].
fieldName
());
// Look for a FieldDocImpl that is documented by serialFieldTagImpl.
// Look for a FieldDocImpl that is documented by serialFieldTagImpl.
...
...
test/com/sun/javadoc/testIndex/TestIndex.java
浏览文件 @
17c3050f
/*
/*
* Copyright (c) 2003, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -53,28 +53,28 @@ public class TestIndex extends JavadocTester {
...
@@ -53,28 +53,28 @@ public class TestIndex extends JavadocTester {
//Test index-all.html
//Test index-all.html
{
BUG_ID
+
FS
+
"index-all.html"
,
{
BUG_ID
+
FS
+
"index-all.html"
,
"<a href=\"
./
pkg/C.html\" title=\"class in pkg\"><span class=\"strong\">C</span></a>"
+
"<a href=\"pkg/C.html\" title=\"class in pkg\"><span class=\"strong\">C</span></a>"
+
" - Class in <a href=\"
./
pkg/package-summary.html\">pkg</a>"
},
" - Class in <a href=\"pkg/package-summary.html\">pkg</a>"
},
{
BUG_ID
+
FS
+
"index-all.html"
,
{
BUG_ID
+
FS
+
"index-all.html"
,
"<a href=\"
./
pkg/Interface.html\" title=\"interface in pkg\">"
+
"<a href=\"pkg/Interface.html\" title=\"interface in pkg\">"
+
"<span class=\"strong\">Interface</span></a> - Interface in "
+
"<span class=\"strong\">Interface</span></a> - Interface in "
+
"<a href=\"
./
pkg/package-summary.html\">pkg</a>"
},
"<a href=\"pkg/package-summary.html\">pkg</a>"
},
{
BUG_ID
+
FS
+
"index-all.html"
,
{
BUG_ID
+
FS
+
"index-all.html"
,
"<a href=\"
./
pkg/AnnotationType.html\" title=\"annotation in pkg\">"
+
"<a href=\"pkg/AnnotationType.html\" title=\"annotation in pkg\">"
+
"<span class=\"strong\">AnnotationType</span></a> - Annotation Type in "
+
"<span class=\"strong\">AnnotationType</span></a> - Annotation Type in "
+
"<a href=\"
./
pkg/package-summary.html\">pkg</a>"
},
"<a href=\"pkg/package-summary.html\">pkg</a>"
},
{
BUG_ID
+
FS
+
"index-all.html"
,
{
BUG_ID
+
FS
+
"index-all.html"
,
"<a href=\"
./
pkg/Coin.html\" title=\"enum in pkg\">"
+
"<a href=\"pkg/Coin.html\" title=\"enum in pkg\">"
+
"<span class=\"strong\">Coin</span></a> - Enum in "
+
"<span class=\"strong\">Coin</span></a> - Enum in "
+
"<a href=\"
./
pkg/package-summary.html\">pkg</a>"
},
"<a href=\"pkg/package-summary.html\">pkg</a>"
},
{
BUG_ID
+
FS
+
"index-all.html"
,
{
BUG_ID
+
FS
+
"index-all.html"
,
"Class in <a href=\"
./
package-summary.html\"><Unnamed></a>"
},
"Class in <a href=\"package-summary.html\"><Unnamed></a>"
},
{
BUG_ID
+
FS
+
"index-all.html"
,
{
BUG_ID
+
FS
+
"index-all.html"
,
"<dl>"
+
NL
+
"<dt><span class=\"strong\"><a href=\"
./
pkg/C.html#Java\">"
+
"<dl>"
+
NL
+
"<dt><span class=\"strong\"><a href=\"pkg/C.html#Java\">"
+
"Java</a></span> - Static variable in class pkg.<a href=\"
./
pkg/C.html\" "
+
"Java</a></span> - Static variable in class pkg.<a href=\"pkg/C.html\" "
+
"title=\"class in pkg\">C</a></dt>"
+
NL
+
"<dd> </dd>"
+
NL
+
"title=\"class in pkg\">C</a></dt>"
+
NL
+
"<dd> </dd>"
+
NL
+
"<dt><span class=\"strong\"><a href=\"
./
pkg/C.html#JDK\">JDK</a></span> "
+
"<dt><span class=\"strong\"><a href=\"pkg/C.html#JDK\">JDK</a></span> "
+
"- Static variable in class pkg.<a href=\"
./
pkg/C.html\" title=\"class in pkg\">"
+
"- Static variable in class pkg.<a href=\"pkg/C.html\" title=\"class in pkg\">"
+
"C</a></dt>"
+
NL
+
"<dd> </dd>"
+
NL
+
"</dl>"
},
"C</a></dt>"
+
NL
+
"<dd> </dd>"
+
NL
+
"</dl>"
},
};
};
private
static
final
String
[][]
NEGATED_TEST
=
NO_TEST
;
private
static
final
String
[][]
NEGATED_TEST
=
NO_TEST
;
...
...
test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
浏览文件 @
17c3050f
/*
/*
* Copyright (c) 2003, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -663,14 +663,14 @@ public class TestNewLanguageFeatures extends JavadocTester {
...
@@ -663,14 +663,14 @@ public class TestNewLanguageFeatures extends JavadocTester {
// TYPE PARAMETER IN INDEX
// TYPE PARAMETER IN INDEX
//=================================
//=================================
{
BUG_ID
+
FS
+
"index-all.html"
,
{
BUG_ID
+
FS
+
"index-all.html"
,
"<span class=\"strong\"><a href=\"
./
pkg2/Foo.html#method(java.util.Vector)\">"
+
"<span class=\"strong\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
+
"method(Vector<Object>)</a></span>"
"method(Vector<Object>)</a></span>"
},
},
//=================================
//=================================
// TYPE PARAMETER IN INDEX
// TYPE PARAMETER IN INDEX
//=================================
//=================================
{
BUG_ID
+
FS
+
"index-all.html"
,
{
BUG_ID
+
FS
+
"index-all.html"
,
"<span class=\"strong\"><a href=\"
./
pkg2/Foo.html#method(java.util.Vector)\">"
+
"<span class=\"strong\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
+
"method(Vector<Object>)</a></span>"
"method(Vector<Object>)</a></span>"
},
},
};
};
...
...
test/com/sun/javadoc/testPackagePage/TestPackagePage.java
浏览文件 @
17c3050f
/*
/*
* Copyright (c) 2002, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -52,7 +52,7 @@ public class TestPackagePage extends JavadocTester {
...
@@ -52,7 +52,7 @@ public class TestPackagePage extends JavadocTester {
"<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
"<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
},
},
{
BUG_ID
+
"-1"
+
FS
+
"index-all.html"
,
{
BUG_ID
+
"-1"
+
FS
+
"index-all.html"
,
"<li><a href=\"
./
com/pkg/package-summary.html\">Package</a></li>"
"<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
},
},
{
BUG_ID
+
"-1"
+
FS
+
"help-doc.html"
,
{
BUG_ID
+
"-1"
+
FS
+
"help-doc.html"
,
"<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
"<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录