author | jjg |
Fri, 12 Aug 2016 15:41:47 -0700 | |
changeset 40314 | 52f8470ce3e4 |
parent 40303 | 96a1226aca18 |
child 40508 | 74ef30d16fb9 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
35419 | 2 |
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
10 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
10 | 24 |
*/ |
25 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
26 |
package jdk.javadoc.internal.doclets.toolkit; |
10 | 27 |
|
14258 | 28 |
import java.io.*; |
29 |
import java.util.*; |
|
35419 | 30 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
31 |
import javax.lang.model.element.Element; |
36526 | 32 |
import javax.lang.model.element.ModuleElement; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
33 |
import javax.lang.model.element.PackageElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
34 |
import javax.lang.model.element.TypeElement; |
22153
f9f06fcca59d
8029800: Flags.java uses String.toLowerCase without specifying Locale
jlahoda
parents:
19937
diff
changeset
|
35 |
import javax.tools.JavaFileManager; |
36526 | 36 |
import javax.tools.JavaFileManager.Location; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
37 |
import javax.tools.JavaFileObject; |
14258 | 38 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
39 |
import com.sun.source.util.DocTreePath; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
40 |
import jdk.javadoc.doclet.Doclet; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
41 |
import jdk.javadoc.doclet.DocletEnvironment; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
42 |
import jdk.javadoc.doclet.Reporter; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
43 |
import jdk.javadoc.internal.doclets.toolkit.builders.BuilderFactory; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
44 |
import jdk.javadoc.internal.doclets.toolkit.taglets.TagletManager; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
45 |
import jdk.javadoc.internal.doclets.toolkit.util.DocFile; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
46 |
import jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
47 |
import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
48 |
import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
49 |
import jdk.javadoc.internal.doclets.toolkit.util.Extern; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
50 |
import jdk.javadoc.internal.doclets.toolkit.util.Group; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
51 |
import jdk.javadoc.internal.doclets.toolkit.util.MetaKeywords; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
52 |
import jdk.javadoc.internal.doclets.toolkit.util.TypeElementCatalog; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
53 |
import jdk.javadoc.internal.doclets.toolkit.util.Utils; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
54 |
import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap.GetterSetter; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
55 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
56 |
import static javax.tools.Diagnostic.Kind.*; |
10 | 57 |
|
58 |
/** |
|
59 |
* Configure the output based on the options. Doclets should sub-class |
|
60 |
* Configuration, to configure and add their own options. This class contains |
|
61 |
* all user options which are supported by the 1.1 doclet and the standard |
|
62 |
* doclet. |
|
63 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
64 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
65 |
* If you write code that depends on this, you do so at your own risk. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
66 |
* This code and its internal interfaces are subject to change or |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
67 |
* deletion without notice.</b> |
10 | 68 |
* |
69 |
* @author Robert Field. |
|
70 |
* @author Atul Dambalkar. |
|
71 |
* @author Jamie Ho |
|
72 |
*/ |
|
73 |
public abstract class Configuration { |
|
74 |
||
75 |
/** |
|
16324 | 76 |
* Exception used to report a problem during setOptions. |
77 |
*/ |
|
16560 | 78 |
public static class Fault extends Exception { |
16324 | 79 |
private static final long serialVersionUID = 0; |
80 |
||
81 |
Fault(String msg) { |
|
82 |
super(msg); |
|
83 |
} |
|
84 |
||
85 |
Fault(String msg, Exception cause) { |
|
86 |
super(msg, cause); |
|
87 |
} |
|
88 |
} |
|
89 |
||
90 |
/** |
|
10 | 91 |
* The factory for builders. |
92 |
*/ |
|
93 |
protected BuilderFactory builderFactory; |
|
94 |
||
95 |
/** |
|
96 |
* The taglet manager. |
|
97 |
*/ |
|
98 |
public TagletManager tagletManager; |
|
99 |
||
100 |
/** |
|
101 |
* The path to the builder XML input file. |
|
102 |
*/ |
|
103 |
public String builderXMLPath; |
|
104 |
||
105 |
/** |
|
106 |
* The default path to the builder XML. |
|
107 |
*/ |
|
108 |
private static final String DEFAULT_BUILDER_XML = "resources/doclet.xml"; |
|
109 |
||
110 |
/** |
|
111 |
* The path to Taglets |
|
112 |
*/ |
|
113 |
public String tagletpath = ""; |
|
114 |
||
115 |
/** |
|
116 |
* This is true if option "-serialwarn" is used. Defualt value is false to |
|
14545
2e7bab0639b8
6493690: javadoc should have a javax.tools.Tool service provider installed in tools.jar
jjg
parents:
14544
diff
changeset
|
117 |
* suppress excessive warnings about serial tag. |
10 | 118 |
*/ |
119 |
public boolean serialwarn = false; |
|
120 |
||
121 |
/** |
|
122 |
* The specified amount of space between tab stops. |
|
123 |
*/ |
|
14542 | 124 |
public int sourcetab; |
125 |
||
126 |
public String tabSpaces; |
|
10 | 127 |
|
128 |
/** |
|
129 |
* True if we should generate browsable sources. |
|
130 |
*/ |
|
131 |
public boolean linksource = false; |
|
132 |
||
133 |
/** |
|
134 |
* True if command line option "-nosince" is used. Default value is |
|
135 |
* false. |
|
136 |
*/ |
|
137 |
public boolean nosince = false; |
|
138 |
||
139 |
/** |
|
140 |
* True if we should recursively copy the doc-file subdirectories |
|
141 |
*/ |
|
142 |
public boolean copydocfilesubdirs = false; |
|
143 |
||
144 |
/** |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
145 |
* Maintain backward compatibility with previous javadoc version |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
146 |
*/ |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
147 |
public boolean backwardCompatibility = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
148 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
149 |
/** |
10 | 150 |
* The META charset tag used for cross-platform viewing. |
151 |
*/ |
|
152 |
public String charset = ""; |
|
153 |
||
154 |
/** |
|
155 |
* True if user wants to add member names as meta keywords. |
|
156 |
* Set to false because meta keywords are ignored in general |
|
157 |
* by most Internet search engines. |
|
158 |
*/ |
|
159 |
public boolean keywords = false; |
|
160 |
||
161 |
/** |
|
1475 | 162 |
* The meta tag keywords instance. |
10 | 163 |
*/ |
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
24221
diff
changeset
|
164 |
public final MetaKeywords metakeywords; |
10 | 165 |
|
166 |
/** |
|
167 |
* The list of doc-file subdirectories to exclude |
|
168 |
*/ |
|
868 | 169 |
protected Set<String> excludedDocFileDirs; |
10 | 170 |
|
171 |
/** |
|
172 |
* The list of qualifiers to exclude |
|
173 |
*/ |
|
868 | 174 |
protected Set<String> excludedQualifiers; |
10 | 175 |
|
176 |
/** |
|
177 |
* The Root of the generated Program Structure from the Doclet API. |
|
178 |
*/ |
|
39364
bd6d4a7936b4
8160301: javadoc RootDoclmpl and DocEnv needs to be renamed
ksrini
parents:
39181
diff
changeset
|
179 |
public DocletEnvironment docEnv; |
10 | 180 |
|
181 |
/** |
|
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
24221
diff
changeset
|
182 |
* An utility class for commonly used helpers |
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
24221
diff
changeset
|
183 |
*/ |
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
24221
diff
changeset
|
184 |
public Utils utils; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
185 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
186 |
/** |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
187 |
* All the temporary accessors to javac internals. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
188 |
*/ |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
189 |
public WorkArounds workArounds; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
190 |
|
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
24221
diff
changeset
|
191 |
/** |
10 | 192 |
* Destination directory name, in which doclet will generate the entire |
193 |
* documentation. Default is current directory. |
|
194 |
*/ |
|
195 |
public String destDirName = ""; |
|
196 |
||
197 |
/** |
|
198 |
* Destination directory name, in which doclet will copy the doc-files to. |
|
199 |
*/ |
|
200 |
public String docFileDestDirName = ""; |
|
201 |
||
202 |
/** |
|
203 |
* Encoding for this document. Default is default encoding for this |
|
204 |
* platform. |
|
205 |
*/ |
|
206 |
public String docencoding = null; |
|
207 |
||
208 |
/** |
|
209 |
* True if user wants to suppress descriptions and tags. |
|
210 |
*/ |
|
211 |
public boolean nocomment = false; |
|
212 |
||
213 |
/** |
|
214 |
* Encoding for this document. Default is default encoding for this |
|
215 |
* platform. |
|
216 |
*/ |
|
217 |
public String encoding = null; |
|
218 |
||
219 |
/** |
|
220 |
* Generate author specific information for all the classes if @author |
|
221 |
* tag is used in the doc comment and if -author option is used. |
|
222 |
* <code>showauthor</code> is set to true if -author option is used. |
|
223 |
* Default is don't show author information. |
|
224 |
*/ |
|
225 |
public boolean showauthor = false; |
|
226 |
||
227 |
/** |
|
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
228 |
* Generate documentation for JavaFX getters and setters automatically |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
229 |
* by copying it from the appropriate property definition. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
230 |
*/ |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
231 |
public boolean javafx = false; |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
232 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
233 |
/** |
10 | 234 |
* Generate version specific information for the all the classes |
235 |
* if @version tag is used in the doc comment and if -version option is |
|
236 |
* used. <code>showversion</code> is set to true if -version option is |
|
237 |
* used.Default is don't show version information. |
|
238 |
*/ |
|
239 |
public boolean showversion = false; |
|
240 |
||
241 |
/** |
|
36526 | 242 |
* Sourcepath from where to read the source files. Default is classpath. |
243 |
* |
|
244 |
*/ |
|
245 |
public String sourcepath = ""; |
|
246 |
||
247 |
/** |
|
248 |
* Generate modules documentation if more than one module is present. |
|
249 |
*/ |
|
250 |
public boolean showModules = false; |
|
251 |
||
252 |
/** |
|
10 | 253 |
* Don't generate deprecated API information at all, if -nodeprecated |
254 |
* option is used. <code>nodepracted</code> is set to true if |
|
255 |
* -nodeprecated option is used. Default is generate deprected API |
|
256 |
* information. |
|
257 |
*/ |
|
258 |
public boolean nodeprecated = false; |
|
259 |
||
260 |
/** |
|
261 |
* The catalog of classes specified on the command-line |
|
262 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
263 |
public TypeElementCatalog typeElementCatalog; |
10 | 264 |
|
265 |
/** |
|
266 |
* True if user wants to suppress time stamp in output. |
|
267 |
* Default is false. |
|
268 |
*/ |
|
269 |
public boolean notimestamp= false; |
|
270 |
||
271 |
/** |
|
1475 | 272 |
* The package grouping instance. |
10 | 273 |
*/ |
1475 | 274 |
public final Group group = new Group(this); |
10 | 275 |
|
276 |
/** |
|
1475 | 277 |
* The tracker of external package links. |
10 | 278 |
*/ |
279 |
public final Extern extern = new Extern(this); |
|
280 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
281 |
public Reporter reporter; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
282 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
283 |
public Locale locale; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
284 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
285 |
/** |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
286 |
* Suppress all messages |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
287 |
*/ |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
288 |
public boolean quiet = false; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
289 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
290 |
private String urlForLink; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
291 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
292 |
private String pkglistUrlForLink; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
293 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
294 |
private String urlForLinkOffline; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
295 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
296 |
private String pkglistUrlForLinkOffline; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
297 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
298 |
private List<GroupContainer> groups; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
299 |
|
40303 | 300 |
public abstract Messages getMessages(); |
301 |
public abstract Resources getResources(); |
|
302 |
||
10 | 303 |
/** |
304 |
* Return the build date for the doclet. |
|
305 |
*/ |
|
306 |
public abstract String getDocletSpecificBuildDate(); |
|
307 |
||
308 |
/** |
|
309 |
* This method should be defined in all those doclets(configurations), |
|
310 |
* which want to derive themselves from this Configuration. This method |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
311 |
* can be used to finish up the options setup. |
10 | 312 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
313 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
314 |
public abstract boolean finishOptionSettings(); |
10 | 315 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
316 |
public CommentUtils cmtUtils; |
37943
2efb75c09230
8154262: Navigation bar in javadoc generated pages needs to be updated to display module information
bpatel
parents:
37848
diff
changeset
|
317 |
public SortedSet<ModuleElement> modules; |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
318 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
319 |
/** |
24221
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22165
diff
changeset
|
320 |
* A sorted set of packages specified on the command-line merged with a |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22165
diff
changeset
|
321 |
* collection of packages that contain the classes specified on the |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22165
diff
changeset
|
322 |
* command-line. |
10 | 323 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
324 |
public SortedSet<PackageElement> packages; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
325 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
326 |
protected final List<Doclet.Option> optionsProcessed; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
327 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
328 |
public final OverviewElement overviewElement; |
10 | 329 |
|
35419 | 330 |
// The following three fields provide caches for use by all instances of VisibleMemberMap. |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
331 |
public final Map<TypeElement, List<Element>> propertiesCache = new HashMap<>(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
332 |
public final Map<Element, Element> classPropertiesMap = new HashMap<>(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
333 |
public final Map<Element, GetterSetter> getterSetterMap = new HashMap<>(); |
35419 | 334 |
|
35420 | 335 |
public DocFileFactory docFileFactory; |
336 |
||
10 | 337 |
/** |
36526 | 338 |
* A sorted set of modules containing the packages. |
339 |
*/ |
|
340 |
public Map<ModuleElement, Set<PackageElement>> modulePackages; |
|
341 |
||
40303 | 342 |
protected static final String sharedResourceBundleName = |
343 |
"jdk.javadoc.internal.doclets.toolkit.resources.doclets"; |
|
36526 | 344 |
/** |
10 | 345 |
* Constructor. Constructs the message retriever with resource file. |
346 |
*/ |
|
347 |
public Configuration() { |
|
22163 | 348 |
excludedDocFileDirs = new HashSet<>(); |
349 |
excludedQualifiers = new HashSet<>(); |
|
14542 | 350 |
setTabWidth(DocletConstants.DEFAULT_TAB_STOP_LENGTH); |
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
24221
diff
changeset
|
351 |
metakeywords = new MetaKeywords(this); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
352 |
optionsProcessed = new ArrayList<>(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
353 |
groups = new ArrayList<>(0); |
39364
bd6d4a7936b4
8160301: javadoc RootDoclmpl and DocEnv needs to be renamed
ksrini
parents:
39181
diff
changeset
|
354 |
overviewElement = new OverviewElement(docEnv); |
10 | 355 |
} |
356 |
||
357 |
/** |
|
358 |
* Return the builder factory for this doclet. |
|
359 |
* |
|
360 |
* @return the builder factory for this doclet. |
|
361 |
*/ |
|
362 |
public BuilderFactory getBuilderFactory() { |
|
363 |
if (builderFactory == null) { |
|
364 |
builderFactory = new BuilderFactory(this); |
|
365 |
} |
|
366 |
return builderFactory; |
|
367 |
} |
|
368 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
369 |
public Reporter getReporter() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
370 |
return this.reporter; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
371 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
372 |
|
36526 | 373 |
private void initModules() { |
374 |
// Build the modules structure used by the doclet |
|
375 |
modulePackages = new TreeMap<>(utils.makeModuleComparator()); |
|
376 |
for (PackageElement p: packages) { |
|
39364
bd6d4a7936b4
8160301: javadoc RootDoclmpl and DocEnv needs to be renamed
ksrini
parents:
39181
diff
changeset
|
377 |
ModuleElement mdle = docEnv.getElementUtils().getModuleOf(p); |
36526 | 378 |
if (mdle != null && !mdle.isUnnamed()) { |
379 |
Set<PackageElement> s = modulePackages.get(mdle); |
|
380 |
if (s == null) |
|
381 |
modulePackages.put(mdle, s = new TreeSet<>(utils.makePackageComparator())); |
|
382 |
s.add(p); |
|
383 |
} |
|
384 |
} |
|
37943
2efb75c09230
8154262: Navigation bar in javadoc generated pages needs to be updated to display module information
bpatel
parents:
37848
diff
changeset
|
385 |
modules = new TreeSet<>(utils.makeModuleComparator()); |
2efb75c09230
8154262: Navigation bar in javadoc generated pages needs to be updated to display module information
bpatel
parents:
37848
diff
changeset
|
386 |
modules.addAll(modulePackages.keySet()); |
36526 | 387 |
showModules = (modulePackages.size() > 1); |
388 |
} |
|
389 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
390 |
private void initPackages() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
391 |
packages = new TreeSet<>(utils.makePackageComparator()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
392 |
packages.addAll(utils.getSpecifiedPackages()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
393 |
for (TypeElement aClass : utils.getSpecifiedClasses()) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
394 |
packages.add(utils.containingPackage(aClass)); |
10 | 395 |
} |
396 |
} |
|
397 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
398 |
public Set<Doclet.Option> getSupportedOptions() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
399 |
Doclet.Option[] options = { |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
400 |
new Option(this, "-author") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
401 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
402 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
403 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
404 |
showauthor = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
405 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
406 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
407 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
408 |
new Option(this, "-d", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
409 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
410 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
411 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
412 |
destDirName = addTrailingFileSep(args.next()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
413 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
414 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
415 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
416 |
new Option(this, "-docencoding", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
417 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
418 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
419 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
420 |
docencoding = args.next(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
421 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
422 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
423 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
424 |
new Option(this, "-docfilessubdirs") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
425 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
426 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
427 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
428 |
copydocfilesubdirs = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
429 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
430 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
431 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
432 |
new Hidden(this, "-encoding", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
433 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
434 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
435 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
436 |
encoding = args.next(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
437 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
438 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
439 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
440 |
new Option(this, "-excludedocfilessubdir", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
441 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
442 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
443 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
444 |
addToSet(excludedDocFileDirs, args.next()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
445 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
446 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
447 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
448 |
new Option(this, "-group", 2) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
449 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
450 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
451 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
452 |
groups.add(new GroupContainer(args.next(), args.next())); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
453 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
454 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
455 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
456 |
new Hidden(this, "-javafx") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
457 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
458 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
459 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
460 |
javafx = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
461 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
462 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
463 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
464 |
new Option(this, "-keywords") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
465 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
466 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
467 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
468 |
keywords = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
469 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
470 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
471 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
472 |
new Option(this, "-link", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
473 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
474 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
475 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
476 |
urlForLink = args.next(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
477 |
pkglistUrlForLink = urlForLink; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
478 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
479 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
480 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
481 |
new Option(this, "-linksource") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
482 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
483 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
484 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
485 |
linksource = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
486 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
487 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
488 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
489 |
new Option(this, "-linkoffline", 2) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
490 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
491 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
492 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
493 |
urlForLinkOffline = args.next(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
494 |
pkglistUrlForLinkOffline = args.next(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
495 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
496 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
497 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
498 |
new Option(this, "-nocomment") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
499 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
500 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
501 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
502 |
nocomment = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
503 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
504 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
505 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
506 |
new Option(this, "-nodeprecated") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
507 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
508 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
509 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
510 |
nodeprecated = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
511 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
512 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
513 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
514 |
new Option(this, "-nosince") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
515 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
516 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
517 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
518 |
nosince = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
519 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
520 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
521 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
522 |
new Option(this, "-notimestamp") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
523 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
524 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
525 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
526 |
notimestamp = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
527 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
528 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
529 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
530 |
new Option(this, "-noqualifier", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
531 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
532 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
533 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
534 |
addToSet(excludedQualifiers, args.next()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
535 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
536 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
537 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
538 |
new Hidden(this, "-quiet") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
539 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
540 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
541 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
542 |
quiet = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
543 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
544 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
545 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
546 |
new Option(this, "-serialwarn") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
547 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
548 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
549 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
550 |
serialwarn = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
551 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
552 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
553 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
554 |
new Option(this, "-sourcetab", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
555 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
556 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
557 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
558 |
linksource = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
559 |
try { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
560 |
setTabWidth(Integer.parseInt(args.next())); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
561 |
} catch (NumberFormatException e) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
562 |
//Set to -1 so that warning will be printed |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
563 |
//to indicate what is valid argument. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
564 |
sourcetab = -1; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
565 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
566 |
if (sourcetab <= 0) { |
40303 | 567 |
getMessages().warning("doclet.sourcetab_warning"); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
568 |
setTabWidth(DocletConstants.DEFAULT_TAB_STOP_LENGTH); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
569 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
570 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
571 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
572 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
573 |
new Option(this, "-tag", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
574 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
575 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
576 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
577 |
ArrayList<String> list = new ArrayList<>(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
578 |
list.add(opt); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
579 |
list.add(args.next()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
580 |
customTagStrs.add(list); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
581 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
582 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
583 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
584 |
new Option(this, "-taglet", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
585 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
586 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
587 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
588 |
ArrayList<String> list = new ArrayList<>(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
589 |
list.add(opt); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
590 |
list.add(args.next()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
591 |
customTagStrs.add(list); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
592 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
593 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
594 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
595 |
new Option(this, "-tagletpath", 1) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
596 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
597 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
598 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
599 |
tagletpath = args.next(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
600 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
601 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
602 |
}, |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
603 |
new Option(this, "-version") { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
604 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
605 |
public boolean process(String opt, ListIterator<String> args) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
606 |
optionsProcessed.add(this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
607 |
showversion = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
608 |
return true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
609 |
} |
19937
7dacecdfbad4
8015496: Information that package is deprecated is missing in profiles view
bpatel
parents:
19911
diff
changeset
|
610 |
} |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
611 |
}; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
612 |
Set<Doclet.Option> set = new TreeSet<>(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
613 |
set.addAll(Arrays.asList(options)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
614 |
return set; |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
615 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
616 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
617 |
final LinkedHashSet<List<String>> customTagStrs = new LinkedHashSet<>(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
618 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
619 |
/* |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
620 |
* when this is called all the option have been set, this method, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
621 |
* initializes certain components before anything else is started. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
622 |
*/ |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
623 |
private void finishOptionSettings0() throws Fault { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
624 |
ensureOutputDirExists(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
625 |
if (urlForLink != null && pkglistUrlForLink != null) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
626 |
extern.link(urlForLink, pkglistUrlForLink, reporter, false); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
627 |
if (urlForLinkOffline != null && pkglistUrlForLinkOffline != null) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
628 |
extern.link(urlForLinkOffline, pkglistUrlForLinkOffline, reporter, true); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
629 |
if (docencoding == null) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
630 |
docencoding = encoding; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
631 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
632 |
typeElementCatalog = new TypeElementCatalog(utils.getSpecifiedClasses(), this); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
633 |
initTagletManager(customTagStrs); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
634 |
groups.stream().forEach((grp) -> { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
635 |
group.checkPackageGroups(grp.value1, grp.value2); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
636 |
}); |
10 | 637 |
} |
638 |
||
639 |
/** |
|
640 |
* Set the command line options supported by this configuration. |
|
641 |
* |
|
36526 | 642 |
* @return true if the options are set successfully |
10 | 643 |
* @throws DocletAbortException |
644 |
*/ |
|
36526 | 645 |
public boolean setOptions() throws Fault { |
19911 | 646 |
try { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
647 |
initPackages(); |
36526 | 648 |
initModules(); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
649 |
finishOptionSettings0(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
650 |
if (!finishOptionSettings()) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
651 |
return false; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
652 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
653 |
} catch (Fault f) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
654 |
throw new DocletAbortException(f.getMessage()); |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
655 |
} |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
656 |
return true; |
10 | 657 |
} |
658 |
||
16324 | 659 |
private void ensureOutputDirExists() throws Fault { |
660 |
DocFile destDir = DocFile.createFileForDirectory(this, destDirName); |
|
661 |
if (!destDir.exists()) { |
|
662 |
//Create the output directory (in case it doesn't exist yet) |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
663 |
if (!destDirName.isEmpty()) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
664 |
reporter.print(NOTE, getText("doclet.dest_dir_create", destDirName)); |
16324 | 665 |
destDir.mkdirs(); |
666 |
} else if (!destDir.isDirectory()) { |
|
667 |
throw new Fault(getText( |
|
668 |
"doclet.destination_directory_not_directory_0", |
|
669 |
destDir.getPath())); |
|
670 |
} else if (!destDir.canWrite()) { |
|
671 |
throw new Fault(getText( |
|
672 |
"doclet.destination_directory_not_writable_0", |
|
673 |
destDir.getPath())); |
|
674 |
} |
|
675 |
} |
|
676 |
||
10 | 677 |
/** |
678 |
* Initialize the taglet manager. The strings to initialize the simple custom tags should |
|
679 |
* be in the following format: "[tag name]:[location str]:[heading]". |
|
14545
2e7bab0639b8
6493690: javadoc should have a javax.tools.Tool service provider installed in tools.jar
jjg
parents:
14544
diff
changeset
|
680 |
* @param customTagStrs the set two dimensional arrays of strings. These arrays contain |
10 | 681 |
* either -tag or -taglet arguments. |
682 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
683 |
private void initTagletManager(Set<List<String>> customTagStrs) { |
10 | 684 |
tagletManager = tagletManager == null ? |
40303 | 685 |
new TagletManager(nosince, showversion, showauthor, javafx, this) : |
10 | 686 |
tagletManager; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
687 |
for (List<String> args : customTagStrs) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
688 |
if (args.get(0).equals("-taglet")) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
689 |
tagletManager.addCustomTag(args.get(1), getFileManager(), tagletpath); |
10 | 690 |
continue; |
691 |
} |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
692 |
List<String> tokens = tokenize(args.get(1), TagletManager.SIMPLE_TAGLET_OPT_SEPARATOR, 3); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
693 |
if (tokens.size() == 1) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
694 |
String tagName = args.get(1); |
10 | 695 |
if (tagletManager.isKnownCustomTag(tagName)) { |
696 |
//reorder a standard tag |
|
697 |
tagletManager.addNewSimpleCustomTag(tagName, null, ""); |
|
698 |
} else { |
|
699 |
//Create a simple tag with the heading that has the same name as the tag. |
|
14263 | 700 |
StringBuilder heading = new StringBuilder(tagName + ":"); |
10 | 701 |
heading.setCharAt(0, Character.toUpperCase(tagName.charAt(0))); |
702 |
tagletManager.addNewSimpleCustomTag(tagName, heading.toString(), "a"); |
|
703 |
} |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
704 |
} else if (tokens.size() == 2) { |
10 | 705 |
//Add simple taglet without heading, probably to excluding it in the output. |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
706 |
tagletManager.addNewSimpleCustomTag(tokens.get(0), tokens.get(1), ""); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
707 |
} else if (tokens.size() >= 3) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
708 |
tagletManager.addNewSimpleCustomTag(tokens.get(0), tokens.get(2), tokens.get(1)); |
10 | 709 |
} else { |
40303 | 710 |
Messages messages = getMessages(); |
711 |
messages.error("doclet.Error_invalid_custom_tag_argument", args.get(1)); |
|
10 | 712 |
} |
713 |
} |
|
714 |
} |
|
715 |
||
14368
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
716 |
/** |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
717 |
* Given a string, return an array of tokens. The separator can be escaped |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
718 |
* with the '\' character. The '\' character may also be escaped by the |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
719 |
* '\' character. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
720 |
* |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
721 |
* @param s the string to tokenize. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
722 |
* @param separator the separator char. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
723 |
* @param maxTokens the maximum number of tokens returned. If the |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
724 |
* max is reached, the remaining part of s is appended |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
725 |
* to the end of the last token. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
726 |
* |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
727 |
* @return an array of tokens. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
728 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
729 |
private List<String> tokenize(String s, char separator, int maxTokens) { |
22163 | 730 |
List<String> tokens = new ArrayList<>(); |
14368
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
731 |
StringBuilder token = new StringBuilder (); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
732 |
boolean prevIsEscapeChar = false; |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
733 |
for (int i = 0; i < s.length(); i += Character.charCount(i)) { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
734 |
int currentChar = s.codePointAt(i); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
735 |
if (prevIsEscapeChar) { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
736 |
// Case 1: escaped character |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
737 |
token.appendCodePoint(currentChar); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
738 |
prevIsEscapeChar = false; |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
739 |
} else if (currentChar == separator && tokens.size() < maxTokens-1) { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
740 |
// Case 2: separator |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
741 |
tokens.add(token.toString()); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
742 |
token = new StringBuilder(); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
743 |
} else if (currentChar == '\\') { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
744 |
// Case 3: escape character |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
745 |
prevIsEscapeChar = true; |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
746 |
} else { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
747 |
// Case 4: regular character |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
748 |
token.appendCodePoint(currentChar); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
749 |
} |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
750 |
} |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
751 |
if (token.length() > 0) { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
752 |
tokens.add(token.toString()); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
753 |
} |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
754 |
return tokens; |
14368
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
755 |
} |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
756 |
|
868 | 757 |
private void addToSet(Set<String> s, String str){ |
10 | 758 |
StringTokenizer st = new StringTokenizer(str, ":"); |
759 |
String current; |
|
760 |
while(st.hasMoreTokens()){ |
|
761 |
current = st.nextToken(); |
|
762 |
s.add(current); |
|
763 |
} |
|
764 |
} |
|
765 |
||
766 |
/** |
|
14061
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
767 |
* Add a trailing file separator, if not found. Remove superfluous |
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
768 |
* file separators if any. Preserve the front double file separator for |
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
769 |
* UNC paths. |
10 | 770 |
* |
771 |
* @param path Path under consideration. |
|
772 |
* @return String Properly constructed path string. |
|
773 |
*/ |
|
14061
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
774 |
public static String addTrailingFileSep(String path) { |
10 | 775 |
String fs = System.getProperty("file.separator"); |
776 |
String dblfs = fs + fs; |
|
777 |
int indexDblfs; |
|
14061
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
778 |
while ((indexDblfs = path.indexOf(dblfs, 1)) >= 0) { |
10 | 779 |
path = path.substring(0, indexDblfs) + |
780 |
path.substring(indexDblfs + fs.length()); |
|
781 |
} |
|
782 |
if (!path.endsWith(fs)) |
|
783 |
path += fs; |
|
784 |
return path; |
|
785 |
} |
|
786 |
||
787 |
/** |
|
788 |
* This checks for the validity of the options used by the user. |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
789 |
* This works exactly like DocErrorReporter. This will validate the options which are shared |
10 | 790 |
* by our doclets. For example, this method will flag an error using |
791 |
* the DocErrorReporter if user has used "-nohelp" and "-helpfile" option |
|
792 |
* together. |
|
793 |
* |
|
794 |
* @return true if all the options are valid. |
|
795 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
796 |
public boolean generalValidOptions() { |
10 | 797 |
boolean docencodingfound = false; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
798 |
for (Doclet.Option opt : optionsProcessed) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
799 |
if (opt.matches("-docencoding")) { |
10 | 800 |
docencodingfound = true; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
801 |
if (!checkOutputFileEncoding(docencoding)) { |
10 | 802 |
return false; |
803 |
} |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
804 |
}; |
10 | 805 |
} |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
806 |
if (!docencodingfound && (encoding != null && !encoding.isEmpty())) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
807 |
if (!checkOutputFileEncoding(encoding)) { |
10 | 808 |
return false; |
809 |
} |
|
810 |
} |
|
811 |
return true; |
|
812 |
} |
|
813 |
||
814 |
/** |
|
815 |
* Check the validity of the given Source or Output File encoding on this |
|
816 |
* platform. |
|
817 |
* |
|
818 |
* @param docencoding output file encoding. |
|
819 |
* @param reporter used to report errors. |
|
820 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
821 |
private boolean checkOutputFileEncoding(String docencoding) { |
10 | 822 |
OutputStream ost= new ByteArrayOutputStream(); |
823 |
OutputStreamWriter osw = null; |
|
824 |
try { |
|
825 |
osw = new OutputStreamWriter(ost, docencoding); |
|
826 |
} catch (UnsupportedEncodingException exc) { |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
827 |
reporter.print(ERROR, getText("doclet.Encoding_not_supported", docencoding)); |
10 | 828 |
return false; |
829 |
} finally { |
|
830 |
try { |
|
831 |
if (osw != null) { |
|
832 |
osw.close(); |
|
833 |
} |
|
834 |
} catch (IOException exc) { |
|
835 |
} |
|
836 |
} |
|
837 |
return true; |
|
838 |
} |
|
839 |
||
840 |
/** |
|
841 |
* Return true if the given doc-file subdirectory should be excluded and |
|
842 |
* false otherwise. |
|
843 |
* @param docfilesubdir the doc-files subdirectory to check. |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
844 |
* @return true if the directory is excluded. |
10 | 845 |
*/ |
846 |
public boolean shouldExcludeDocFileDir(String docfilesubdir){ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
847 |
return excludedDocFileDirs.contains(docfilesubdir); |
10 | 848 |
} |
849 |
||
850 |
/** |
|
851 |
* Return true if the given qualifier should be excluded and false otherwise. |
|
852 |
* @param qualifier the qualifier to check. |
|
853 |
*/ |
|
854 |
public boolean shouldExcludeQualifier(String qualifier){ |
|
855 |
if (excludedQualifiers.contains("all") || |
|
856 |
excludedQualifiers.contains(qualifier) || |
|
857 |
excludedQualifiers.contains(qualifier + ".*")) { |
|
858 |
return true; |
|
859 |
} else { |
|
860 |
int index = -1; |
|
861 |
while ((index = qualifier.indexOf(".", index + 1)) != -1) { |
|
862 |
if (excludedQualifiers.contains(qualifier.substring(0, index + 1) + "*")) { |
|
863 |
return true; |
|
864 |
} |
|
865 |
} |
|
866 |
return false; |
|
867 |
} |
|
868 |
} |
|
869 |
||
870 |
/** |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
871 |
* Return the qualified name of the Element if its qualifier is not excluded. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
872 |
* Otherwise return the unqualified Element name. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
873 |
* @param te the TypeElement to check. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
874 |
* @return the class name |
10 | 875 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
876 |
public String getClassName(TypeElement te) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
877 |
PackageElement pkg = utils.containingPackage(te); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
878 |
return shouldExcludeQualifier(utils.getPackageName(pkg)) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
879 |
? utils.getSimpleName(te) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
880 |
: utils.getFullyQualifiedName(te); |
10 | 881 |
} |
882 |
||
40303 | 883 |
/** |
884 |
* Convenience method to obtain a resource from the doclet's |
|
885 |
* {@link Resources resources}. |
|
886 |
* Equivalent to <code>getResources.getText(key);</code>. |
|
887 |
* @param key the key for the desired string |
|
888 |
* @return the string for the given key |
|
889 |
* @throws MissingResourceException if the key is not found in either |
|
890 |
* bundle. |
|
891 |
*/ |
|
892 |
public abstract String getText(String key); |
|
10 | 893 |
|
40303 | 894 |
/** |
895 |
* Convenience method to obtain a resource from the doclet's |
|
896 |
* {@link Resources resources}. |
|
897 |
* Equivalent to <code>getResources.getText(key, args);</code>. |
|
898 |
* @param key the key for the desired string |
|
899 |
* @param args values to be substituted into the resulting string |
|
900 |
* @return the string for the given key |
|
901 |
* @throws MissingResourceException if the key is not found in either |
|
902 |
* bundle. |
|
903 |
*/ |
|
904 |
public abstract String getText(String key, String... args); |
|
10 | 905 |
|
40303 | 906 |
/** |
907 |
* Convenience method to obtain a resource from the doclet's |
|
908 |
* {@link Resources resources} as a {@code Content} object. |
|
909 |
* |
|
910 |
* @param key the key for the desired string |
|
911 |
* @return a content tree for the text |
|
912 |
*/ |
|
913 |
public abstract Content getContent(String key); |
|
10 | 914 |
|
40303 | 915 |
/** |
916 |
* Convenience method to obtain a resource from the doclet's |
|
917 |
* {@link Resources resources} as a {@code Content} object. |
|
918 |
* |
|
919 |
* @param key the key for the desired string |
|
920 |
* @param o string or content argument added to configuration text |
|
921 |
* @return a content tree for the text |
|
922 |
*/ |
|
923 |
public abstract Content getContent(String key, Object o); |
|
10 | 924 |
|
40303 | 925 |
/** |
926 |
* Convenience method to obtain a resource from the doclet's |
|
927 |
* {@link Resources resources} as a {@code Content} object. |
|
928 |
* |
|
929 |
* @param key the key for the desired string |
|
930 |
* @param o1 resource argument |
|
931 |
* @param o2 resource argument |
|
932 |
* @return a content tree for the text |
|
933 |
*/ |
|
934 |
public abstract Content getContent(String key, Object o1, Object o2); |
|
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
935 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
936 |
/** |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
937 |
* Get the configuration string as a content. |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
938 |
* |
40303 | 939 |
* @param key the key for the desired string |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
940 |
* @param o0 string or content argument added to configuration text |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
941 |
* @param o1 string or content argument added to configuration text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
942 |
* @param o2 string or content argument added to configuration text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
943 |
* @return a content tree for the text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
944 |
*/ |
40303 | 945 |
public abstract Content getContent(String key, Object o0, Object o1, Object o2); |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
946 |
|
10 | 947 |
/** |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
948 |
* Return true if the TypeElement element is getting documented, depending upon |
9606
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
949 |
* -nodeprecated option and the deprecation information. Return true if |
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
950 |
* -nodeprecated is not used. Return false if -nodeprecated is used and if |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
951 |
* either TypeElement element is deprecated or the containing package is deprecated. |
9606
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
952 |
* |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
953 |
* @param te the TypeElement for which the page generation is checked |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
954 |
* @return true if it is a generated doc. |
10 | 955 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
956 |
public boolean isGeneratedDoc(TypeElement te) { |
10 | 957 |
if (!nodeprecated) { |
958 |
return true; |
|
959 |
} |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
960 |
return !(utils.isDeprecated(te) || utils.isDeprecated(utils.containingPackage(te))); |
10 | 961 |
} |
962 |
||
963 |
/** |
|
964 |
* Return the doclet specific instance of a writer factory. |
|
965 |
* @return the {@link WriterFactory} for the doclet. |
|
966 |
*/ |
|
967 |
public abstract WriterFactory getWriterFactory(); |
|
968 |
||
969 |
/** |
|
970 |
* Return the input stream to the builder XML. |
|
971 |
* |
|
972 |
* @return the input steam to the builder XML. |
|
973 |
* @throws FileNotFoundException when the given XML file cannot be found. |
|
974 |
*/ |
|
14544 | 975 |
public InputStream getBuilderXML() throws IOException { |
10 | 976 |
return builderXMLPath == null ? |
977 |
Configuration.class.getResourceAsStream(DEFAULT_BUILDER_XML) : |
|
14368
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
978 |
DocFile.createFileForInput(this, builderXMLPath).openInputStream(); |
10 | 979 |
} |
980 |
||
981 |
/** |
|
1863
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
982 |
* Return the Locale for this document. |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
983 |
* @return the current locale |
1863
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
984 |
*/ |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
985 |
public abstract Locale getLocale(); |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
986 |
|
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
987 |
/** |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
988 |
* Return the path of the overview file and null if it does not exist. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
989 |
* |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
990 |
* @return the path of the overview file. |
14544 | 991 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
992 |
public abstract JavaFileObject getOverviewPath(); |
14544 | 993 |
|
994 |
/** |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
995 |
* Return the current file manager. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
996 |
* @return JavaFileManager |
10 | 997 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
998 |
public abstract JavaFileManager getFileManager(); |
14542 | 999 |
|
1000 |
private void setTabWidth(int n) { |
|
1001 |
sourcetab = n; |
|
1002 |
tabSpaces = String.format("%" + n + "s", ""); |
|
1003 |
} |
|
15354 | 1004 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1005 |
public abstract boolean showMessage(DocTreePath path, String key); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1006 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1007 |
public abstract boolean showMessage(Element e, String key); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1008 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1009 |
public static abstract class Option implements Doclet.Option, Comparable<Option> { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1010 |
private final String name; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1011 |
private final String parameters; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1012 |
private final String description; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1013 |
private final int argCount; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1014 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1015 |
protected final Configuration c; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1016 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1017 |
protected Option(Configuration config, String keyName, String name, int argCount) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1018 |
c = config; |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
1019 |
this.name = name; |
40314
52f8470ce3e4
8163524: doclet resources doclet.usage.NAME.name are redundant
jjg
parents:
40303
diff
changeset
|
1020 |
String desc = getOptionsMessage(keyName + "description"); |
52f8470ce3e4
8163524: doclet resources doclet.usage.NAME.name are redundant
jjg
parents:
40303
diff
changeset
|
1021 |
if (desc.isEmpty()) { |
52f8470ce3e4
8163524: doclet resources doclet.usage.NAME.name are redundant
jjg
parents:
40303
diff
changeset
|
1022 |
this.description = "<MISSING KEY>"; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1023 |
this.parameters = "<MISSING KEY>"; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1024 |
} else { |
40314
52f8470ce3e4
8163524: doclet resources doclet.usage.NAME.name are redundant
jjg
parents:
40303
diff
changeset
|
1025 |
this.description = desc; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1026 |
this.parameters = getOptionsMessage(keyName + "parameters"); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1027 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1028 |
this.argCount = argCount; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1029 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1030 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1031 |
protected Option(String prefix, Configuration config, String name, int argCount) { |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
1032 |
this(config, prefix + name.toLowerCase().replaceAll("^-*", "") + ".", name, argCount); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1033 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1034 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1035 |
protected Option(Configuration config, String name, int argCount) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1036 |
this("doclet.usage.", config, name, argCount); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1037 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1038 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1039 |
protected Option(Configuration config, String name) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1040 |
this(config, name, 0); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1041 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1042 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1043 |
private String getOptionsMessage(String key) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1044 |
try { |
40303 | 1045 |
return c.getResources().getText(key); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1046 |
} catch (MissingResourceException ignore) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1047 |
return ""; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1048 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1049 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1050 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1051 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1052 |
public String getDescription() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1053 |
return description; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1054 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1055 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1056 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1057 |
public Option.Kind getKind() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1058 |
return Doclet.Option.Kind.STANDARD; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1059 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1060 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1061 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1062 |
public String getName() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1063 |
return name; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1064 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1065 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1066 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1067 |
public String getParameters() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1068 |
return parameters; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1069 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1070 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1071 |
/** |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1072 |
* Maintains the formatting for javadoc -help. Note the space |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1073 |
* alignment. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1074 |
*/ |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1075 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1076 |
public String toString() { |
37848
3c8ff4204d2d
8154956: Module system implementation refresh (4/2016)
alanb
parents:
36526
diff
changeset
|
1077 |
String opt = name + (name.endsWith(":") ? "" : " ") + parameters; |
40314
52f8470ce3e4
8163524: doclet resources doclet.usage.NAME.name are redundant
jjg
parents:
40303
diff
changeset
|
1078 |
StringBuffer sb = new StringBuffer(" ").append(opt).append(" "); |
52f8470ce3e4
8163524: doclet resources doclet.usage.NAME.name are redundant
jjg
parents:
40303
diff
changeset
|
1079 |
for (int i = opt.length(); i < 32; i++) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1080 |
sb.append(" "); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1081 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1082 |
sb.append(description); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1083 |
return sb.toString(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1084 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1085 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1086 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1087 |
public int getArgumentCount() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1088 |
return argCount; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1089 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1090 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1091 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1092 |
public boolean matches(String option) { |
39181
e2526131d705
8160135: The Html doclet handles options incorrectly
ksrini
parents:
38515
diff
changeset
|
1093 |
return name.toLowerCase().equals(option.toLowerCase()); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1094 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1095 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1096 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1097 |
public int compareTo(Option that) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1098 |
return this.getName().compareTo(that.getName()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1099 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1100 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1101 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1102 |
public abstract class XOption extends Option { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1103 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1104 |
public XOption(Configuration config, String keyname, String name, int argCount) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1105 |
super(config, keyname, name, argCount); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1106 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1107 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1108 |
public XOption(Configuration config, String name, int argCount) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1109 |
super("doclet.xusage.", config, name, argCount); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1110 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1111 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1112 |
public XOption(Configuration config, String name) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1113 |
this(config, name, 0); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1114 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1115 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1116 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1117 |
public Option.Kind getKind() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1118 |
return Doclet.Option.Kind.EXTENDED; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1119 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1120 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1121 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1122 |
public abstract class Hidden extends Option { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1123 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1124 |
public Hidden(Configuration config, String name, int argCount) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1125 |
super("doclet.xusage.", config, name, argCount); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1126 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1127 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1128 |
public Hidden(Configuration config, String name) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1129 |
this(config, name, 0); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1130 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1131 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1132 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1133 |
public Option.Kind getKind() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1134 |
return Doclet.Option.Kind.OTHER; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1135 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1136 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1137 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1138 |
/* |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1139 |
* Stores a pair of Strings. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1140 |
*/ |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1141 |
protected static class GroupContainer { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1142 |
final String value1; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1143 |
final String value2; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1144 |
public GroupContainer(String value1, String value2) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1145 |
this.value1 = value1; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1146 |
this.value2 = value2; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1147 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
35420
diff
changeset
|
1148 |
} |
36526 | 1149 |
|
1150 |
public abstract Location getLocationForPackage(PackageElement pd); |
|
10 | 1151 |
} |