author | ohair |
Tue, 25 May 2010 15:54:51 -0700 | |
changeset 5520 | 86e4b9a9da40 |
parent 2223 | 95e3c21b2919 |
child 7614 | cfadc977ca75 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
5520 | 2 |
* Copyright (c) 1997, 2009, 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.markup; |
|
27 |
||
1869
0e193a8f3520
6794582: javadoc should read files using a FileManager
jjg
parents:
1787
diff
changeset
|
28 |
import java.io.*; |
0e193a8f3520
6794582: javadoc should read files using a FileManager
jjg
parents:
1787
diff
changeset
|
29 |
import java.util.*; |
10 | 30 |
|
31 |
import com.sun.javadoc.*; |
|
1869
0e193a8f3520
6794582: javadoc should read files using a FileManager
jjg
parents:
1787
diff
changeset
|
32 |
import com.sun.tools.doclets.internal.toolkit.*; |
10 | 33 |
|
34 |
||
35 |
/** |
|
36 |
* Class for the Html Format Code Generation specific to JavaDoc. |
|
37 |
* This Class contains methods related to the Html Code Generation which |
|
38 |
* are used by the Sub-Classes in the package com.sun.tools.doclets.standard |
|
39 |
* and com.sun.tools.doclets.oneone. |
|
40 |
* |
|
41 |
* @since 1.2 |
|
42 |
* @author Atul M Dambalkar |
|
43 |
* @author Robert Field |
|
44 |
*/ |
|
45 |
public abstract class HtmlDocWriter extends HtmlWriter { |
|
46 |
||
47 |
/** |
|
48 |
* Constructor. Initializes the destination file name through the super |
|
49 |
* class HtmlWriter. |
|
50 |
* |
|
51 |
* @param filename String file name. |
|
52 |
*/ |
|
53 |
public HtmlDocWriter(Configuration configuration, |
|
54 |
String filename) throws IOException { |
|
55 |
super(configuration, |
|
56 |
null, configuration.destDirName + filename, |
|
57 |
configuration.docencoding); |
|
1869
0e193a8f3520
6794582: javadoc should read files using a FileManager
jjg
parents:
1787
diff
changeset
|
58 |
// use File to normalize file separators |
10 | 59 |
configuration.message.notice("doclet.Generating_0", |
1869
0e193a8f3520
6794582: javadoc should read files using a FileManager
jjg
parents:
1787
diff
changeset
|
60 |
new File(configuration.destDirName, filename)); |
10 | 61 |
} |
62 |
||
63 |
public HtmlDocWriter(Configuration configuration, |
|
64 |
String path, String filename) throws IOException { |
|
65 |
super(configuration, |
|
66 |
configuration.destDirName + path, filename, |
|
67 |
configuration.docencoding); |
|
1869
0e193a8f3520
6794582: javadoc should read files using a FileManager
jjg
parents:
1787
diff
changeset
|
68 |
// use File to normalize file separators |
10 | 69 |
configuration.message.notice("doclet.Generating_0", |
1869
0e193a8f3520
6794582: javadoc should read files using a FileManager
jjg
parents:
1787
diff
changeset
|
70 |
new File(configuration.destDirName, |
0e193a8f3520
6794582: javadoc should read files using a FileManager
jjg
parents:
1787
diff
changeset
|
71 |
((path.length() > 0)? path + File.separator: "") + filename)); |
10 | 72 |
} |
73 |
||
74 |
/** |
|
75 |
* Accessor for configuration. |
|
76 |
*/ |
|
77 |
public abstract Configuration configuration(); |
|
78 |
||
79 |
/** |
|
80 |
* Print Html Hyper Link. |
|
81 |
* |
|
82 |
* @param link String name of the file. |
|
83 |
* @param where Position of the link in the file. Character '#' is not |
|
84 |
* needed. |
|
85 |
* @param label Tag for the link. |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
86 |
* @param strong Boolean that sets label to strong. |
10 | 87 |
*/ |
88 |
public void printHyperLink(String link, String where, |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
89 |
String label, boolean strong) { |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
90 |
print(getHyperLink(link, where, label, strong, "", "", "")); |
10 | 91 |
} |
92 |
||
93 |
/** |
|
94 |
* Print Html Hyper Link. |
|
95 |
* |
|
96 |
* @param link String name of the file. |
|
97 |
* @param where Position of the link in the file. Character '#' is not |
|
98 |
* needed. |
|
99 |
* @param label Tag for the link. |
|
100 |
*/ |
|
101 |
public void printHyperLink(String link, String where, String label) { |
|
102 |
printHyperLink(link, where, label, false); |
|
103 |
} |
|
104 |
||
105 |
/** |
|
106 |
* Print Html Hyper Link. |
|
107 |
* |
|
108 |
* @param link String name of the file. |
|
109 |
* @param where Position of the link in the file. Character '#' is not |
|
110 |
* needed. |
|
111 |
* @param label Tag for the link. |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
112 |
* @param strong Boolean that sets label to strong. |
10 | 113 |
* @param stylename String style of text defined in style sheet. |
114 |
*/ |
|
115 |
public void printHyperLink(String link, String where, |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
116 |
String label, boolean strong, |
10 | 117 |
String stylename) { |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
118 |
print(getHyperLink(link, where, label, strong, stylename, "", "")); |
10 | 119 |
} |
120 |
||
121 |
/** |
|
122 |
* Return Html Hyper Link string. |
|
123 |
* |
|
124 |
* @param link String name of the file. |
|
125 |
* @param where Position of the link in the file. Character '#' is not |
|
126 |
* needed. |
|
127 |
* @param label Tag for the link. |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
128 |
* @param strong Boolean that sets label to strong. |
10 | 129 |
* @return String Hyper Link. |
130 |
*/ |
|
131 |
public String getHyperLink(String link, String where, |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
132 |
String label, boolean strong) { |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
133 |
return getHyperLink(link, where, label, strong, "", "", ""); |
10 | 134 |
} |
135 |
||
136 |
/** |
|
137 |
* Get Html Hyper Link string. |
|
138 |
* |
|
139 |
* @param link String name of the file. |
|
140 |
* @param where Position of the link in the file. Character '#' is not |
|
141 |
* needed. |
|
142 |
* @param label Tag for the link. |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
143 |
* @param strong Boolean that sets label to strong. |
10 | 144 |
* @param stylename String style of text defined in style sheet. |
145 |
* @return String Hyper Link. |
|
146 |
*/ |
|
147 |
public String getHyperLink(String link, String where, |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
148 |
String label, boolean strong, |
10 | 149 |
String stylename) { |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
150 |
return getHyperLink(link, where, label, strong, stylename, "", ""); |
10 | 151 |
} |
152 |
||
153 |
/** |
|
154 |
* Get Html Hyper Link string. |
|
155 |
* |
|
156 |
* @param link String name of the file. |
|
157 |
* @param where Position of the link in the file. Character '#' is not |
|
158 |
* needed. |
|
159 |
* @param label Tag for the link. |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
160 |
* @param strong Boolean that sets label to strong. |
10 | 161 |
* @param stylename String style of text defined in style sheet. |
162 |
* @param title String that describes the link's content for accessibility. |
|
163 |
* @param target Target frame. |
|
164 |
* @return String Hyper Link. |
|
165 |
*/ |
|
166 |
public String getHyperLink(String link, String where, |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
167 |
String label, boolean strong, |
10 | 168 |
String stylename, String title, String target) { |
169 |
StringBuffer retlink = new StringBuffer(); |
|
170 |
retlink.append("<A HREF=\""); |
|
171 |
retlink.append(link); |
|
172 |
if (where != null && where.length() != 0) { |
|
173 |
retlink.append("#"); |
|
174 |
retlink.append(where); |
|
175 |
} |
|
176 |
retlink.append("\""); |
|
177 |
if (title != null && title.length() != 0) { |
|
178 |
retlink.append(" title=\"" + title + "\""); |
|
179 |
} |
|
180 |
if (target != null && target.length() != 0) { |
|
181 |
retlink.append(" target=\"" + target + "\""); |
|
182 |
} |
|
183 |
retlink.append(">"); |
|
184 |
if (stylename != null && stylename.length() != 0) { |
|
185 |
retlink.append("<FONT CLASS=\""); |
|
186 |
retlink.append(stylename); |
|
187 |
retlink.append("\">"); |
|
188 |
} |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
189 |
if (strong) { |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
190 |
retlink.append("<STRONG>"); |
10 | 191 |
} |
192 |
retlink.append(label); |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
193 |
if (strong) { |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
194 |
retlink.append("</STRONG>"); |
10 | 195 |
} |
196 |
if (stylename != null && stylename.length() != 0) { |
|
197 |
retlink.append("</FONT>"); |
|
198 |
} |
|
199 |
retlink.append("</A>"); |
|
200 |
return retlink.toString(); |
|
201 |
} |
|
202 |
||
203 |
/** |
|
204 |
* Print link without positioning in the file. |
|
205 |
* |
|
206 |
* @param link String name of the file. |
|
207 |
* @param label Tag for the link. |
|
208 |
*/ |
|
209 |
public void printHyperLink(String link, String label) { |
|
210 |
print(getHyperLink(link, "", label, false)); |
|
211 |
} |
|
212 |
||
213 |
/** |
|
214 |
* Get link string without positioning in the file. |
|
215 |
* |
|
216 |
* @param link String name of the file. |
|
217 |
* @param label Tag for the link. |
|
218 |
* @return Strign Hyper link. |
|
219 |
*/ |
|
220 |
public String getHyperLink(String link, String label) { |
|
221 |
return getHyperLink(link, "", label, false); |
|
222 |
} |
|
223 |
||
224 |
/** |
|
225 |
* Print the name of the package, this class is in. |
|
226 |
* |
|
227 |
* @param cd ClassDoc. |
|
228 |
*/ |
|
229 |
public void printPkgName(ClassDoc cd) { |
|
230 |
print(getPkgName(cd)); |
|
231 |
} |
|
232 |
||
233 |
/** |
|
234 |
* Get the name of the package, this class is in. |
|
235 |
* |
|
236 |
* @param cd ClassDoc. |
|
237 |
*/ |
|
238 |
public String getPkgName(ClassDoc cd) { |
|
239 |
String pkgName = cd.containingPackage().name(); |
|
240 |
if (pkgName.length() > 0) { |
|
241 |
pkgName += "."; |
|
242 |
return pkgName; |
|
243 |
} |
|
244 |
return ""; |
|
245 |
} |
|
246 |
||
247 |
/** |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
248 |
* Keep track of member details list. Print the definition list start tag |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
249 |
* if it is not printed yet. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
250 |
*/ |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
251 |
public void printMemberDetailsListStartTag () { |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
252 |
if (!getMemberDetailsListPrinted()) { |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
253 |
dl(); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
254 |
memberDetailsListPrinted = true; |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
255 |
} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
256 |
} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
257 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
258 |
/** |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
259 |
* Print the definition list end tag if the list start tag was printed. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
260 |
*/ |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
261 |
public void printMemberDetailsListEndTag () { |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
262 |
if (getMemberDetailsListPrinted()) { |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
263 |
dlEnd(); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
264 |
memberDetailsListPrinted = false; |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
265 |
} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
266 |
} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
267 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
268 |
public boolean getMemberDetailsListPrinted() { |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
269 |
return memberDetailsListPrinted; |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
270 |
} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
271 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1869
diff
changeset
|
272 |
/** |
10 | 273 |
* Print the frameset version of the Html file header. |
274 |
* Called only when generating an HTML frameset file. |
|
275 |
* |
|
276 |
* @param title Title of this HTML document. |
|
277 |
*/ |
|
278 |
public void printFramesetHeader(String title) { |
|
279 |
printFramesetHeader(title, false); |
|
280 |
} |
|
281 |
||
282 |
/** |
|
283 |
* Print the frameset version of the Html file header. |
|
284 |
* Called only when generating an HTML frameset file. |
|
285 |
* |
|
286 |
* @param title Title of this HTML document. |
|
287 |
* @param noTimeStamp If true, don't print time stamp in header. |
|
288 |
*/ |
|
289 |
public void printFramesetHeader(String title, boolean noTimeStamp) { |
|
290 |
println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " + |
|
291 |
"Frameset//EN\" " + |
|
292 |
"\"http://www.w3.org/TR/html4/frameset.dtd\">"); |
|
293 |
println("<!--NewPage-->"); |
|
294 |
html(); |
|
295 |
head(); |
|
296 |
if (! noTimeStamp) { |
|
297 |
print("<!-- Generated by javadoc on "); |
|
298 |
print(today()); |
|
299 |
println("-->"); |
|
300 |
} |
|
301 |
if (configuration.charset.length() > 0) { |
|
302 |
println("<META http-equiv=\"Content-Type\" content=\"text/html; " |
|
303 |
+ "charset=" + configuration.charset + "\">"); |
|
304 |
} |
|
305 |
title(); |
|
306 |
println(title); |
|
307 |
titleEnd(); |
|
308 |
//Script to set the classFrame if necessary. |
|
309 |
script(); |
|
310 |
println(" targetPage = \"\" + window.location.search;"); |
|
311 |
println(" if (targetPage != \"\" && targetPage != \"undefined\")"); |
|
312 |
println(" targetPage = targetPage.substring(1);"); |
|
313 |
println(" if (targetPage.indexOf(\":\") != -1)"); |
|
314 |
println(" targetPage = \"undefined\";"); |
|
315 |
||
316 |
println(" function loadFrames() {"); |
|
317 |
println(" if (targetPage != \"\" && targetPage != \"undefined\")"); |
|
318 |
println(" top.classFrame.location = top.targetPage;"); |
|
319 |
println(" }"); |
|
320 |
scriptEnd(); |
|
321 |
noScript(); |
|
322 |
noScriptEnd(); |
|
323 |
headEnd(); |
|
324 |
} |
|
325 |
||
326 |
/** |
|
327 |
* Print the appropriate spaces to format the class tree in the class page. |
|
328 |
* |
|
329 |
* @param len Number of spaces. |
|
330 |
*/ |
|
331 |
public String spaces(int len) { |
|
332 |
String space = ""; |
|
333 |
||
334 |
for (int i = 0; i < len; i++) { |
|
335 |
space += " "; |
|
336 |
} |
|
337 |
return space; |
|
338 |
} |
|
339 |
||
340 |
/** |
|
341 |
* Print the closing </body> and </html> tags. |
|
342 |
*/ |
|
343 |
public void printBodyHtmlEnd() { |
|
344 |
println(); |
|
345 |
bodyEnd(); |
|
346 |
htmlEnd(); |
|
347 |
} |
|
348 |
||
349 |
/** |
|
350 |
* Calls {@link #printBodyHtmlEnd()} method. |
|
351 |
*/ |
|
352 |
public void printFooter() { |
|
353 |
printBodyHtmlEnd(); |
|
354 |
} |
|
355 |
||
356 |
/** |
|
357 |
* Print closing </html> tag. |
|
358 |
*/ |
|
359 |
public void printFrameFooter() { |
|
360 |
htmlEnd(); |
|
361 |
} |
|
362 |
||
363 |
/** |
|
364 |
* Print ten non-breaking spaces("&nbsp;"). |
|
365 |
*/ |
|
366 |
public void printNbsps() { |
|
367 |
print(" "); |
|
368 |
} |
|
369 |
||
370 |
/** |
|
371 |
* Get the day and date information for today, depending upon user option. |
|
372 |
* |
|
373 |
* @return String Today. |
|
374 |
* @see java.util.Calendar |
|
375 |
* @see java.util.GregorianCalendar |
|
376 |
* @see java.util.TimeZone |
|
377 |
*/ |
|
378 |
public String today() { |
|
379 |
Calendar calendar = new GregorianCalendar(TimeZone.getDefault()); |
|
380 |
return calendar.getTime().toString(); |
|
381 |
} |
|
382 |
} |