author | jjg |
Tue, 23 Oct 2012 13:20:37 -0700 | |
changeset 14357 | faf9cde2817b |
parent 14259 | fb94a1df0d53 |
child 14368 | 6f4c62de6985 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
2 |
* Copyright (c) 1998, 2012, 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 |
||
26 |
package com.sun.tools.doclets.formats.html; |
|
27 |
||
14258 | 28 |
import java.io.*; |
29 |
import java.net.*; |
|
30 |
import java.util.*; |
|
10 | 31 |
|
32 |
import com.sun.javadoc.*; |
|
14258 | 33 |
import com.sun.tools.doclets.internal.toolkit.*; |
34 |
import com.sun.tools.doclets.internal.toolkit.util.*; |
|
10 | 35 |
|
36 |
/** |
|
37 |
* Configure the output based on the command line options. |
|
38 |
* <p> |
|
39 |
* Also determine the length of the command line option. For example, |
|
40 |
* for a option "-header" there will be a string argument associated, then the |
|
41 |
* the length of option "-header" is two. But for option "-nohelp" no argument |
|
42 |
* is needed so it's length is 1. |
|
43 |
* </p> |
|
44 |
* <p> |
|
45 |
* Also do the error checking on the options used. For example it is illegal to |
|
46 |
* use "-helpfile" option when already "-nohelp" option is used. |
|
47 |
* </p> |
|
48 |
* |
|
49 |
* @author Robert Field. |
|
50 |
* @author Atul Dambalkar. |
|
51 |
* @author Jamie Ho |
|
9608 | 52 |
* @author Bhavesh Patel (Modified) |
10 | 53 |
*/ |
54 |
public class ConfigurationImpl extends Configuration { |
|
55 |
||
1475 | 56 |
private static ConfigurationImpl instance = new ConfigurationImpl(); |
10 | 57 |
|
58 |
/** |
|
59 |
* The build date. Note: For now, we will use |
|
60 |
* a version number instead of a date. |
|
61 |
*/ |
|
62 |
public static final String BUILD_DATE = System.getProperty("java.version"); |
|
63 |
||
64 |
/** |
|
65 |
* Argument for command line option "-header". |
|
66 |
*/ |
|
67 |
public String header = ""; |
|
68 |
||
69 |
/** |
|
70 |
* Argument for command line option "-packagesheader". |
|
71 |
*/ |
|
72 |
public String packagesheader = ""; |
|
73 |
||
74 |
/** |
|
75 |
* Argument for command line option "-footer". |
|
76 |
*/ |
|
77 |
public String footer = ""; |
|
78 |
||
79 |
/** |
|
80 |
* Argument for command line option "-doctitle". |
|
81 |
*/ |
|
82 |
public String doctitle = ""; |
|
83 |
||
84 |
/** |
|
85 |
* Argument for command line option "-windowtitle". |
|
86 |
*/ |
|
87 |
public String windowtitle = ""; |
|
88 |
||
89 |
/** |
|
90 |
* Argument for command line option "-top". |
|
91 |
*/ |
|
92 |
public String top = ""; |
|
93 |
||
94 |
/** |
|
95 |
* Argument for command line option "-bottom". |
|
96 |
*/ |
|
97 |
public String bottom = ""; |
|
98 |
||
99 |
/** |
|
100 |
* Argument for command line option "-helpfile". |
|
101 |
*/ |
|
102 |
public String helpfile = ""; |
|
103 |
||
104 |
/** |
|
105 |
* Argument for command line option "-stylesheetfile". |
|
106 |
*/ |
|
107 |
public String stylesheetfile = ""; |
|
108 |
||
109 |
/** |
|
9608 | 110 |
* Argument for command line option "-Xdocrootparent". |
111 |
*/ |
|
112 |
public String docrootparent = ""; |
|
113 |
||
114 |
/** |
|
10 | 115 |
* True if command line option "-nohelp" is used. Default value is false. |
116 |
*/ |
|
117 |
public boolean nohelp = false; |
|
118 |
||
119 |
/** |
|
120 |
* True if command line option "-splitindex" is used. Default value is |
|
121 |
* false. |
|
122 |
*/ |
|
123 |
public boolean splitindex = false; |
|
124 |
||
125 |
/** |
|
126 |
* False if command line option "-noindex" is used. Default value is true. |
|
127 |
*/ |
|
128 |
public boolean createindex = true; |
|
129 |
||
130 |
/** |
|
131 |
* True if command line option "-use" is used. Default value is false. |
|
132 |
*/ |
|
133 |
public boolean classuse = false; |
|
134 |
||
135 |
/** |
|
136 |
* False if command line option "-notree" is used. Default value is true. |
|
137 |
*/ |
|
138 |
public boolean createtree = true; |
|
139 |
||
140 |
/** |
|
141 |
* True if command line option "-nodeprecated" is used. Default value is |
|
142 |
* false. |
|
143 |
*/ |
|
144 |
public boolean nodeprecatedlist = false; |
|
145 |
||
146 |
/** |
|
147 |
* True if command line option "-nonavbar" is used. Default value is false. |
|
148 |
*/ |
|
149 |
public boolean nonavbar = false; |
|
150 |
||
151 |
/** |
|
152 |
* True if command line option "-nooverview" is used. Default value is |
|
153 |
* false |
|
154 |
*/ |
|
155 |
private boolean nooverview = false; |
|
156 |
||
157 |
/** |
|
158 |
* True if command line option "-overview" is used. Default value is false. |
|
159 |
*/ |
|
160 |
public boolean overview = false; |
|
161 |
||
162 |
/** |
|
163 |
* This is true if option "-overview" is used or option "-overview" is not |
|
164 |
* used and number of packages is more than one. |
|
165 |
*/ |
|
166 |
public boolean createoverview = false; |
|
167 |
||
168 |
/** |
|
169 |
* Unique Resource Handler for this package. |
|
170 |
*/ |
|
171 |
public final MessageRetriever standardmessage; |
|
172 |
||
173 |
/** |
|
174 |
* First file to appear in the right-hand frame in the generated |
|
175 |
* documentation. |
|
176 |
*/ |
|
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14259
diff
changeset
|
177 |
public DocPath topFile = DocPath.empty; |
10 | 178 |
|
179 |
/** |
|
180 |
* The classdoc for the class file getting generated. |
|
181 |
*/ |
|
182 |
public ClassDoc currentcd = null; // Set this classdoc in the |
|
183 |
// ClassWriter. |
|
184 |
||
185 |
/** |
|
14259 | 186 |
* Constructor. Initializes resource for the |
187 |
* {@link com.sun.tools.doclets.internal.toolkit.util.MessageRetriever MessageRetriever}. |
|
10 | 188 |
*/ |
189 |
private ConfigurationImpl() { |
|
190 |
standardmessage = new MessageRetriever(this, |
|
191 |
"com.sun.tools.doclets.formats.html.resources.standard"); |
|
192 |
} |
|
193 |
||
1475 | 194 |
/** |
195 |
* Reset to a fresh new ConfigurationImpl, to allow multiple invocations |
|
196 |
* of javadoc within a single VM. It would be better not to be using |
|
197 |
* static fields at all, but .... (sigh). |
|
198 |
*/ |
|
199 |
public static void reset() { |
|
200 |
instance = new ConfigurationImpl(); |
|
201 |
} |
|
202 |
||
10 | 203 |
public static ConfigurationImpl getInstance() { |
204 |
return instance; |
|
205 |
} |
|
206 |
||
207 |
/** |
|
208 |
* Return the build date for the doclet. |
|
209 |
*/ |
|
210 |
public String getDocletSpecificBuildDate() { |
|
211 |
return BUILD_DATE; |
|
212 |
} |
|
213 |
||
214 |
/** |
|
215 |
* Depending upon the command line options provided by the user, set |
|
216 |
* configure the output generation environment. |
|
217 |
* |
|
218 |
* @param options The array of option names and values. |
|
219 |
*/ |
|
220 |
public void setSpecificDocletOptions(String[][] options) { |
|
221 |
for (int oi = 0; oi < options.length; ++oi) { |
|
222 |
String[] os = options[oi]; |
|
223 |
String opt = os[0].toLowerCase(); |
|
224 |
if (opt.equals("-footer")) { |
|
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
225 |
footer = os[1]; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
226 |
} else if (opt.equals("-header")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
227 |
header = os[1]; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
228 |
} else if (opt.equals("-packagesheader")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
229 |
packagesheader = os[1]; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
230 |
} else if (opt.equals("-doctitle")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
231 |
doctitle = os[1]; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
232 |
} else if (opt.equals("-windowtitle")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
233 |
windowtitle = os[1]; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
234 |
} else if (opt.equals("-top")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
235 |
top = os[1]; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
236 |
} else if (opt.equals("-bottom")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
237 |
bottom = os[1]; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
238 |
} else if (opt.equals("-helpfile")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
239 |
helpfile = os[1]; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
240 |
} else if (opt.equals("-stylesheetfile")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
241 |
stylesheetfile = os[1]; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
242 |
} else if (opt.equals("-charset")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
243 |
charset = os[1]; |
9608 | 244 |
} else if (opt.equals("-xdocrootparent")) { |
245 |
docrootparent = os[1]; |
|
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
246 |
} else if (opt.equals("-nohelp")) { |
10 | 247 |
nohelp = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
248 |
} else if (opt.equals("-splitindex")) { |
10 | 249 |
splitindex = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
250 |
} else if (opt.equals("-noindex")) { |
10 | 251 |
createindex = false; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
252 |
} else if (opt.equals("-use")) { |
10 | 253 |
classuse = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
254 |
} else if (opt.equals("-notree")) { |
10 | 255 |
createtree = false; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
256 |
} else if (opt.equals("-nodeprecatedlist")) { |
10 | 257 |
nodeprecatedlist = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
258 |
} else if (opt.equals("-nonavbar")) { |
10 | 259 |
nonavbar = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
260 |
} else if (opt.equals("-nooverview")) { |
10 | 261 |
nooverview = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9608
diff
changeset
|
262 |
} else if (opt.equals("-overview")) { |
10 | 263 |
overview = true; |
264 |
} |
|
265 |
} |
|
266 |
if (root.specifiedClasses().length > 0) { |
|
868 | 267 |
Map<String,PackageDoc> map = new HashMap<String,PackageDoc>(); |
10 | 268 |
PackageDoc pd; |
269 |
ClassDoc[] classes = root.classes(); |
|
270 |
for (int i = 0; i < classes.length; i++) { |
|
271 |
pd = classes[i].containingPackage(); |
|
272 |
if(! map.containsKey(pd.name())) { |
|
273 |
map.put(pd.name(), pd); |
|
274 |
} |
|
275 |
} |
|
276 |
} |
|
277 |
setCreateOverview(); |
|
278 |
setTopFile(root); |
|
279 |
} |
|
280 |
||
281 |
/** |
|
282 |
* Returns the "length" of a given option. If an option takes no |
|
283 |
* arguments, its length is one. If it takes one argument, it's |
|
284 |
* length is two, and so on. This method is called by JavaDoc to |
|
285 |
* parse the options it does not recognize. It then calls |
|
286 |
* {@link #validOptions(String[][], DocErrorReporter)} to |
|
287 |
* validate them. |
|
288 |
* <b>Note:</b><br> |
|
289 |
* The options arrive as case-sensitive strings. For options that |
|
290 |
* are not case-sensitive, use toLowerCase() on the option string |
|
291 |
* before comparing it. |
|
292 |
* </blockquote> |
|
293 |
* |
|
294 |
* @return number of arguments + 1 for a option. Zero return means |
|
295 |
* option not known. Negative value means error occurred. |
|
296 |
*/ |
|
297 |
public int optionLength(String option) { |
|
298 |
int result = -1; |
|
299 |
if ((result = super.optionLength(option)) > 0) { |
|
300 |
return result; |
|
301 |
} |
|
302 |
// otherwise look for the options we have added |
|
303 |
option = option.toLowerCase(); |
|
304 |
if (option.equals("-nodeprecatedlist") || |
|
305 |
option.equals("-noindex") || |
|
306 |
option.equals("-notree") || |
|
307 |
option.equals("-nohelp") || |
|
308 |
option.equals("-splitindex") || |
|
309 |
option.equals("-serialwarn") || |
|
310 |
option.equals("-use") || |
|
311 |
option.equals("-nonavbar") || |
|
312 |
option.equals("-nooverview")) { |
|
313 |
return 1; |
|
314 |
} else if (option.equals("-help")) { |
|
315 |
System.out.println(getText("doclet.usage")); |
|
316 |
return 1; |
|
317 |
} else if (option.equals("-footer") || |
|
318 |
option.equals("-header") || |
|
319 |
option.equals("-packagesheader") || |
|
320 |
option.equals("-doctitle") || |
|
321 |
option.equals("-windowtitle") || |
|
322 |
option.equals("-top") || |
|
323 |
option.equals("-bottom") || |
|
324 |
option.equals("-helpfile") || |
|
325 |
option.equals("-stylesheetfile") || |
|
326 |
option.equals("-charset") || |
|
9608 | 327 |
option.equals("-overview") || |
328 |
option.equals("-xdocrootparent")) { |
|
10 | 329 |
return 2; |
330 |
} else { |
|
331 |
return 0; |
|
332 |
} |
|
333 |
} |
|
334 |
||
335 |
/** |
|
336 |
* {@inheritDoc} |
|
337 |
*/ |
|
338 |
public boolean validOptions(String options[][], |
|
339 |
DocErrorReporter reporter) { |
|
340 |
boolean helpfile = false; |
|
341 |
boolean nohelp = false; |
|
342 |
boolean overview = false; |
|
343 |
boolean nooverview = false; |
|
344 |
boolean splitindex = false; |
|
345 |
boolean noindex = false; |
|
346 |
// check shared options |
|
347 |
if (!generalValidOptions(options, reporter)) { |
|
348 |
return false; |
|
349 |
} |
|
350 |
// otherwise look at our options |
|
351 |
for (int oi = 0; oi < options.length; ++oi) { |
|
352 |
String[] os = options[oi]; |
|
353 |
String opt = os[0].toLowerCase(); |
|
354 |
if (opt.equals("-helpfile")) { |
|
355 |
if (nohelp == true) { |
|
356 |
reporter.printError(getText("doclet.Option_conflict", |
|
357 |
"-helpfile", "-nohelp")); |
|
358 |
return false; |
|
359 |
} |
|
360 |
if (helpfile == true) { |
|
361 |
reporter.printError(getText("doclet.Option_reuse", |
|
362 |
"-helpfile")); |
|
363 |
return false; |
|
364 |
} |
|
365 |
File help = new File(os[1]); |
|
366 |
if (!help.exists()) { |
|
367 |
reporter.printError(getText("doclet.File_not_found", os[1])); |
|
368 |
return false; |
|
369 |
} |
|
370 |
helpfile = true; |
|
371 |
} else if (opt.equals("-nohelp")) { |
|
372 |
if (helpfile == true) { |
|
373 |
reporter.printError(getText("doclet.Option_conflict", |
|
374 |
"-nohelp", "-helpfile")); |
|
375 |
return false; |
|
376 |
} |
|
377 |
nohelp = true; |
|
9608 | 378 |
} else if (opt.equals("-xdocrootparent")) { |
379 |
try { |
|
380 |
new URL(os[1]); |
|
381 |
} catch (MalformedURLException e) { |
|
382 |
reporter.printError(getText("doclet.MalformedURL", os[1])); |
|
383 |
return false; |
|
384 |
} |
|
10 | 385 |
} else if (opt.equals("-overview")) { |
386 |
if (nooverview == true) { |
|
387 |
reporter.printError(getText("doclet.Option_conflict", |
|
388 |
"-overview", "-nooverview")); |
|
389 |
return false; |
|
390 |
} |
|
391 |
if (overview == true) { |
|
392 |
reporter.printError(getText("doclet.Option_reuse", |
|
393 |
"-overview")); |
|
394 |
return false; |
|
395 |
} |
|
396 |
overview = true; |
|
397 |
} else if (opt.equals("-nooverview")) { |
|
398 |
if (overview == true) { |
|
399 |
reporter.printError(getText("doclet.Option_conflict", |
|
400 |
"-nooverview", "-overview")); |
|
401 |
return false; |
|
402 |
} |
|
403 |
nooverview = true; |
|
404 |
} else if (opt.equals("-splitindex")) { |
|
405 |
if (noindex == true) { |
|
406 |
reporter.printError(getText("doclet.Option_conflict", |
|
407 |
"-splitindex", "-noindex")); |
|
408 |
return false; |
|
409 |
} |
|
410 |
splitindex = true; |
|
411 |
} else if (opt.equals("-noindex")) { |
|
412 |
if (splitindex == true) { |
|
413 |
reporter.printError(getText("doclet.Option_conflict", |
|
414 |
"-noindex", "-splitindex")); |
|
415 |
return false; |
|
416 |
} |
|
417 |
noindex = true; |
|
418 |
} |
|
419 |
} |
|
420 |
return true; |
|
421 |
} |
|
422 |
||
423 |
/** |
|
424 |
* {@inheritDoc} |
|
425 |
*/ |
|
426 |
public MessageRetriever getDocletSpecificMsg() { |
|
427 |
return standardmessage; |
|
428 |
} |
|
429 |
||
430 |
/** |
|
431 |
* Decide the page which will appear first in the right-hand frame. It will |
|
432 |
* be "overview-summary.html" if "-overview" option is used or no |
|
433 |
* "-overview" but the number of packages is more than one. It will be |
|
434 |
* "package-summary.html" of the respective package if there is only one |
|
435 |
* package to document. It will be a class page(first in the sorted order), |
|
436 |
* if only classes are provided on the command line. |
|
437 |
* |
|
438 |
* @param root Root of the program structure. |
|
439 |
*/ |
|
440 |
protected void setTopFile(RootDoc root) { |
|
441 |
if (!checkForDeprecation(root)) { |
|
442 |
return; |
|
443 |
} |
|
444 |
if (createoverview) { |
|
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14259
diff
changeset
|
445 |
topFile = DocPaths.OVERVIEW_SUMMARY; |
10 | 446 |
} else { |
447 |
if (packages.length == 1 && packages[0].name().equals("")) { |
|
448 |
if (root.classes().length > 0) { |
|
449 |
ClassDoc[] classarr = root.classes(); |
|
450 |
Arrays.sort(classarr); |
|
451 |
ClassDoc cd = getValidClass(classarr); |
|
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14259
diff
changeset
|
452 |
topFile = DocPath.forClass(cd); |
10 | 453 |
} |
454 |
} else { |
|
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14259
diff
changeset
|
455 |
topFile = DocPath.forPackage(packages[0]).resolve(DocPaths.PACKAGE_SUMMARY); |
10 | 456 |
} |
457 |
} |
|
458 |
} |
|
459 |
||
460 |
protected ClassDoc getValidClass(ClassDoc[] classarr) { |
|
461 |
if (!nodeprecated) { |
|
462 |
return classarr[0]; |
|
463 |
} |
|
464 |
for (int i = 0; i < classarr.length; i++) { |
|
465 |
if (classarr[i].tags("deprecated").length == 0) { |
|
466 |
return classarr[i]; |
|
467 |
} |
|
468 |
} |
|
469 |
return null; |
|
470 |
} |
|
471 |
||
472 |
protected boolean checkForDeprecation(RootDoc root) { |
|
473 |
ClassDoc[] classarr = root.classes(); |
|
474 |
for (int i = 0; i < classarr.length; i++) { |
|
475 |
if (isGeneratedDoc(classarr[i])) { |
|
476 |
return true; |
|
477 |
} |
|
478 |
} |
|
479 |
return false; |
|
480 |
} |
|
481 |
||
482 |
/** |
|
483 |
* Generate "overview.html" page if option "-overview" is used or number of |
|
484 |
* packages is more than one. Sets {@link #createoverview} field to true. |
|
485 |
*/ |
|
486 |
protected void setCreateOverview() { |
|
487 |
if ((overview || packages.length > 1) && !nooverview) { |
|
488 |
createoverview = true; |
|
489 |
} |
|
490 |
} |
|
491 |
||
492 |
/** |
|
493 |
* {@inheritDoc} |
|
494 |
*/ |
|
495 |
public WriterFactory getWriterFactory() { |
|
1475 | 496 |
return new WriterFactoryImpl(this); |
10 | 497 |
} |
498 |
||
499 |
/** |
|
500 |
* {@inheritDoc} |
|
501 |
*/ |
|
868 | 502 |
public Comparator<ProgramElementDoc> getMemberComparator() { |
10 | 503 |
return null; |
504 |
} |
|
1863
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
505 |
|
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
506 |
/** |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
507 |
* {@inheritDoc} |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
508 |
*/ |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
509 |
public Locale getLocale() { |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
510 |
if (root instanceof com.sun.tools.javadoc.RootDocImpl) |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
511 |
return ((com.sun.tools.javadoc.RootDocImpl)root).getLocale(); |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
512 |
else |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
513 |
return Locale.getDefault(); |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1475
diff
changeset
|
514 |
} |
10 | 515 |
} |