@jahia/javascript-modules-library 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +35 -0
  3. package/core/index.js +1 -0
  4. package/core/server/components/AbsoluteArea.js +1 -0
  5. package/core/server/components/AddContentButtons.js +1 -0
  6. package/core/server/components/AddResources.js +1 -0
  7. package/core/server/components/Area.js +1 -0
  8. package/core/server/components/index.js +1 -0
  9. package/core/server/components/render/HydrateInBrowser.js +1 -0
  10. package/core/server/components/render/Render.js +1 -0
  11. package/core/server/components/render/RenderInBrowser.js +1 -0
  12. package/core/server/components/render/index.js +1 -0
  13. package/core/server/components/render/internal/InBrowser.js +1 -0
  14. package/core/server/framework/defineJahiaComponent.js +1 -0
  15. package/core/server/framework/index.js +1 -0
  16. package/core/server/framework/register.js +1 -0
  17. package/core/server/hooks/index.js +1 -0
  18. package/core/server/hooks/useGQLQuery.js +1 -0
  19. package/core/server/hooks/useJCRQuery.js +1 -0
  20. package/core/server/hooks/useServerContext.js +1 -0
  21. package/core/server/hooks/useUrlBuilder.js +1 -0
  22. package/core/server/index.js +1 -0
  23. package/core/server/utils/index.js +1 -0
  24. package/core/server/utils/jcr/getChildNodes.js +1 -0
  25. package/core/server/utils/jcr/getNodeFromPathOrId.js +1 -0
  26. package/core/server/utils/jcr/getNodeProps.js +1 -0
  27. package/core/server/utils/jcr/getNodesByJCRQuery.js +1 -0
  28. package/core/server/utils/jcr/index.js +1 -0
  29. package/core/server/utils/urlBuilder/index.js +1 -0
  30. package/core/server/utils/urlBuilder/urlBuilder.js +1 -0
  31. package/index.js +1 -0
  32. package/nav/index.js +1 -0
  33. package/nav/server/index.js +1 -0
  34. package/nav/server/navBuilder/index.js +1 -0
  35. package/nav/server/navBuilder/navBuilder.js +24 -0
  36. package/package.json +60 -0
  37. package/types/@jahia/javascript-modules-library-private.d.ts +60 -0
  38. package/types/core/index.d.ts +1 -0
  39. package/types/core/server/components/AbsoluteArea.d.ts +29 -0
  40. package/types/core/server/components/AddContentButtons.d.ts +13 -0
  41. package/types/core/server/components/AddResources.d.ts +31 -0
  42. package/types/core/server/components/Area.d.ts +27 -0
  43. package/types/core/server/components/index.d.ts +5 -0
  44. package/types/core/server/components/render/HydrateInBrowser.d.ts +13 -0
  45. package/types/core/server/components/render/Render.d.ts +23 -0
  46. package/types/core/server/components/render/RenderInBrowser.d.ts +13 -0
  47. package/types/core/server/components/render/index.d.ts +3 -0
  48. package/types/core/server/components/render/internal/InBrowser.d.ts +8 -0
  49. package/types/core/server/framework/defineJahiaComponent.d.ts +41 -0
  50. package/types/core/server/framework/index.d.ts +2 -0
  51. package/types/core/server/framework/register.d.ts +7 -0
  52. package/types/core/server/hooks/index.d.ts +4 -0
  53. package/types/core/server/hooks/useGQLQuery.d.ts +5 -0
  54. package/types/core/server/hooks/useJCRQuery.d.ts +3 -0
  55. package/types/core/server/hooks/useServerContext.d.ts +14 -0
  56. package/types/core/server/hooks/useUrlBuilder.d.ts +31 -0
  57. package/types/core/server/index.d.ts +4 -0
  58. package/types/core/server/utils/index.d.ts +2 -0
  59. package/types/core/server/utils/jcr/getChildNodes.d.ts +9 -0
  60. package/types/core/server/utils/jcr/getNodeFromPathOrId.d.ts +12 -0
  61. package/types/core/server/utils/jcr/getNodeProps.d.ts +7 -0
  62. package/types/core/server/utils/jcr/getNodesByJCRQuery.d.ts +9 -0
  63. package/types/core/server/utils/jcr/index.d.ts +4 -0
  64. package/types/core/server/utils/urlBuilder/index.d.ts +1 -0
  65. package/types/core/server/utils/urlBuilder/urlBuilder.d.ts +27 -0
  66. package/types/globals.d.ts +11 -0
  67. package/types/index.d.ts +19 -0
  68. package/types/java.io.d.ts +694 -0
  69. package/types/java.net.d.ts +190 -0
  70. package/types/java.security.d.ts +27 -0
  71. package/types/java.util.d.ts +1536 -0
  72. package/types/javax.jcr.d.ts +1250 -0
  73. package/types/javax.servlet.d.ts +426 -0
  74. package/types/javax.servlet.http.d.ts +1431 -0
  75. package/types/nav/index.d.ts +1 -0
  76. package/types/nav/server/index.d.ts +1 -0
  77. package/types/nav/server/navBuilder/index.d.ts +1 -0
  78. package/types/nav/server/navBuilder/navBuilder.d.ts +78 -0
  79. package/types/org.jahia.modules.npm.modules.engine.js.server.d.ts +292 -0
  80. package/types/org.jahia.services.content.d.ts +1463 -0
  81. package/types/org.jahia.services.content.decorator.d.ts +92 -0
  82. package/types/org.jahia.services.query.d.ts +35 -0
  83. package/types/org.jahia.services.render.d.ts +168 -0
  84. package/types/org.jahia.services.usermanager.d.ts +85 -0
  85. package/types/org.osgi.framework.d.ts +1004 -0
  86. package/types/server.d.ts +27 -0
  87. package/types/servercontext.d.ts +29 -0
@@ -0,0 +1,694 @@
1
+ declare module 'java.io' {
2
+ import { Locale } from 'java.util';
3
+ export class BufferedReader {
4
+ /**
5
+ * Reads a single character.
6
+ *
7
+ * @return The character read, as an integer in the range
8
+ * 0 to 65535 (`0x00-0xffff`), or -1 if the
9
+ * end of the stream has been reached
10
+ * @exception IOException If an I/O error occurs
11
+ */
12
+ read(): number;
13
+ /**
14
+ * Reads characters into a portion of an array.
15
+ *
16
+ * This method implements the general contract of the corresponding
17
+ * {@link Reader#read(char[], int, int) read} method of the
18
+ * {@link Reader} class. As an additional convenience, it
19
+ * attempts to read as many characters as possible by repeatedly invoking
20
+ * the read method of the underlying stream. This iterated
21
+ * read continues until one of the following conditions becomes
22
+ * true:
23
+ *
24
+ * The specified number of characters have been read,
25
+ *
26
+ * The read method of the underlying stream returns
27
+ * -1, indicating end-of-file, or
28
+ *
29
+ * The ready method of the underlying stream
30
+ * returns false, indicating that further input requests
31
+ * would block.
32
+ *
33
+ * If the first read on the underlying stream returns
34
+ * -1 to indicate end-of-file then this method returns
35
+ * -1. Otherwise this method returns the number of characters
36
+ * actually read.
37
+ *
38
+ * Subclasses of this class are encouraged, but not required, to
39
+ * attempt to read as many characters as possible in the same fashion.
40
+ *
41
+ * Ordinarily this method takes characters from this stream's character
42
+ * buffer, filling it from the underlying stream as necessary. If,
43
+ * however, the buffer is empty, the mark is not valid, and the requested
44
+ * length is at least as large as the buffer, then this method will read
45
+ * characters directly from the underlying stream into the given array.
46
+ * Thus redundant BufferedReaders will not copy data
47
+ * unnecessarily.
48
+ *
49
+ * @param cbuf Destination buffer
50
+ * @param off Offset at which to start storing characters
51
+ * @param len Maximum number of characters to read
52
+ *
53
+ * @return The number of characters read, or -1 if the end of the
54
+ * stream has been reached
55
+ *
56
+ * @exception IOException If an I/O error occurs
57
+ * @exception IndexOutOfBoundsException {@inheritDoc}
58
+ */
59
+ read(cbuf: string[], off: number, len: number): number;
60
+ /**
61
+ * Reads a line of text. A line is considered to be terminated by any one
62
+ * of a line feed ('\n'), a carriage return ('\r'), a carriage return
63
+ * followed immediately by a line feed, or by reaching the end-of-file
64
+ * (EOF).
65
+ *
66
+ * @return A String containing the contents of the line, not including
67
+ * any line-termination characters, or null if the end of the
68
+ * stream has been reached without reading any characters
69
+ *
70
+ * @exception IOException If an I/O error occurs
71
+ *
72
+ * @see java.nio.file.Files#readAllLines
73
+ */
74
+ readLine(): string;
75
+ /**
76
+ * Tells whether this stream is ready to be read. A buffered character
77
+ * stream is ready if the buffer is not empty, or if the underlying
78
+ * character stream is ready.
79
+ *
80
+ * @exception IOException If an I/O error occurs
81
+ */
82
+ ready(): boolean;
83
+ }
84
+ export class File {
85
+ /**
86
+ * Returns the name of the file or directory denoted by this abstract
87
+ * pathname. This is just the last name in the pathname's name
88
+ * sequence. If the pathname's name sequence is empty, then the empty
89
+ * string is returned.
90
+ *
91
+ * @return The name of the file or directory denoted by this abstract
92
+ * pathname, or the empty string if this pathname's name sequence
93
+ * is empty
94
+ */
95
+ getName(): string;
96
+ /**
97
+ * Returns the pathname string of this abstract pathname's parent, or
98
+ * null if this pathname does not name a parent directory.
99
+ *
100
+ * The parent of an abstract pathname consists of the
101
+ * pathname's prefix, if any, and each name in the pathname's name
102
+ * sequence except for the last. If the name sequence is empty then
103
+ * the pathname does not name a parent directory.
104
+ *
105
+ * @return The pathname string of the parent directory named by this
106
+ * abstract pathname, or null if this pathname
107
+ * does not name a parent
108
+ */
109
+ getParent(): string;
110
+ /**
111
+ * Returns the abstract pathname of this abstract pathname's parent,
112
+ * or null if this pathname does not name a parent
113
+ * directory.
114
+ *
115
+ * The parent of an abstract pathname consists of the
116
+ * pathname's prefix, if any, and each name in the pathname's name
117
+ * sequence except for the last. If the name sequence is empty then
118
+ * the pathname does not name a parent directory.
119
+ *
120
+ * @return The abstract pathname of the parent directory named by this
121
+ * abstract pathname, or null if this pathname
122
+ * does not name a parent
123
+ *
124
+ * @since 1.2
125
+ */
126
+ getParentFile(): File;
127
+ /**
128
+ * Converts this abstract pathname into a pathname string. The resulting
129
+ * string uses the {@link #separator default name-separator character} to
130
+ * separate the names in the name sequence.
131
+ *
132
+ * @return The string form of this abstract pathname
133
+ */
134
+ getPath(): string;
135
+ /**
136
+ * Tests whether this abstract pathname is absolute. The definition of
137
+ * absolute pathname is system dependent. On UNIX systems, a pathname is
138
+ * absolute if its prefix is "/". On Microsoft Windows systems, a
139
+ * pathname is absolute if its prefix is a drive specifier followed by
140
+ * "\\", or if its prefix is "\\\\".
141
+ *
142
+ * @return true if this abstract pathname is absolute,
143
+ * false otherwise
144
+ */
145
+ isAbsolute(): boolean;
146
+ /**
147
+ * Returns the absolute pathname string of this abstract pathname.
148
+ *
149
+ * If this abstract pathname is already absolute, then the pathname
150
+ * string is simply returned as if by the {@link #getPath}
151
+ * method. If this abstract pathname is the empty abstract pathname then
152
+ * the pathname string of the current user directory, which is named by the
153
+ * system property user.dir, is returned. Otherwise this
154
+ * pathname is resolved in a system-dependent way. On UNIX systems, a
155
+ * relative pathname is made absolute by resolving it against the current
156
+ * user directory. On Microsoft Windows systems, a relative pathname is made absolute
157
+ * by resolving it against the current directory of the drive named by the
158
+ * pathname, if any; if not, it is resolved against the current user
159
+ * directory.
160
+ *
161
+ * @return The absolute pathname string denoting the same file or
162
+ * directory as this abstract pathname
163
+ *
164
+ * @throws SecurityException
165
+ * If a required system property value cannot be accessed.
166
+ *
167
+ * @see java.io.File#isAbsolute()
168
+ */
169
+ getAbsolutePath(): string;
170
+ /**
171
+ * Returns the absolute form of this abstract pathname. Equivalent to
172
+ * new File(this.{@link #getAbsolutePath}).
173
+ *
174
+ * @return The absolute abstract pathname denoting the same file or
175
+ * directory as this abstract pathname
176
+ *
177
+ * @throws SecurityException
178
+ * If a required system property value cannot be accessed.
179
+ *
180
+ * @since 1.2
181
+ */
182
+ getAbsoluteFile(): File;
183
+ /**
184
+ * Returns the canonical pathname string of this abstract pathname.
185
+ *
186
+ * A canonical pathname is both absolute and unique. The precise
187
+ * definition of canonical form is system-dependent. This method first
188
+ * converts this pathname to absolute form if necessary, as if by invoking the
189
+ * {@link #getAbsolutePath} method, and then maps it to its unique form in a
190
+ * system-dependent way. This typically involves removing redundant names
191
+ * such as `"."` and `".."` from the pathname, resolving
192
+ * symbolic links (on UNIX platforms), and converting drive letters to a
193
+ * standard case (on Microsoft Windows platforms).
194
+ *
195
+ * Every pathname that denotes an existing file or directory has a
196
+ * unique canonical form. Every pathname that denotes a nonexistent file
197
+ * or directory also has a unique canonical form. The canonical form of
198
+ * the pathname of a nonexistent file or directory may be different from
199
+ * the canonical form of the same pathname after the file or directory is
200
+ * created. Similarly, the canonical form of the pathname of an existing
201
+ * file or directory may be different from the canonical form of the same
202
+ * pathname after the file or directory is deleted.
203
+ *
204
+ * @return The canonical pathname string denoting the same file or
205
+ * directory as this abstract pathname
206
+ *
207
+ * @throws IOException
208
+ * If an I/O error occurs, which is possible because the
209
+ * construction of the canonical pathname may require
210
+ * filesystem queries
211
+ *
212
+ * @throws SecurityException
213
+ * If a required system property value cannot be accessed, or
214
+ * if a security manager exists and its {@link
215
+ * java.lang.SecurityManager#checkRead} method denies
216
+ * read access to the file
217
+ *
218
+ * @since 1.1
219
+ * @see Path#toRealPath
220
+ */
221
+ getCanonicalPath(): string;
222
+ /**
223
+ * Returns the canonical form of this abstract pathname. Equivalent to
224
+ * new File(this.{@link #getCanonicalPath}).
225
+ *
226
+ * @return The canonical pathname string denoting the same file or
227
+ * directory as this abstract pathname
228
+ *
229
+ * @throws IOException
230
+ * If an I/O error occurs, which is possible because the
231
+ * construction of the canonical pathname may require
232
+ * filesystem queries
233
+ *
234
+ * @throws SecurityException
235
+ * If a required system property value cannot be accessed, or
236
+ * if a security manager exists and its {@link
237
+ * java.lang.SecurityManager#checkRead} method denies
238
+ * read access to the file
239
+ *
240
+ * @since 1.2
241
+ * @see Path#toRealPath
242
+ */
243
+ getCanonicalFile(): File;
244
+ /**
245
+ * Tests whether the file denoted by this abstract pathname is a
246
+ * directory.
247
+ *
248
+ * Where it is required to distinguish an I/O exception from the case
249
+ * that the file is not a directory, or where several attributes of the
250
+ * same file are required at the same time, then the {@link
251
+ * java.nio.file.Files#readAttributes(Path,Class,LinkOption[])
252
+ * Files.readAttributes} method may be used.
253
+ *
254
+ * @return true if and only if the file denoted by this
255
+ * abstract pathname exists and is a directory;
256
+ * false otherwise
257
+ *
258
+ * @throws SecurityException
259
+ * If a security manager exists and its {@link
260
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
261
+ * method denies read access to the file
262
+ */
263
+ isDirectory(): boolean;
264
+ /**
265
+ * Tests whether the file denoted by this abstract pathname is a normal
266
+ * file. A file is normal if it is not a directory and, in
267
+ * addition, satisfies other system-dependent criteria. Any non-directory
268
+ * file created by a Java application is guaranteed to be a normal file.
269
+ *
270
+ * Where it is required to distinguish an I/O exception from the case
271
+ * that the file is not a normal file, or where several attributes of the
272
+ * same file are required at the same time, then the {@link
273
+ * java.nio.file.Files#readAttributes(Path,Class,LinkOption[])
274
+ * Files.readAttributes} method may be used.
275
+ *
276
+ * @return true if and only if the file denoted by this
277
+ * abstract pathname exists and is a normal file;
278
+ * false otherwise
279
+ *
280
+ * @throws SecurityException
281
+ * If a security manager exists and its {@link
282
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
283
+ * method denies read access to the file
284
+ */
285
+ isFile(): boolean;
286
+ /**
287
+ * Tests whether the file named by this abstract pathname is a hidden
288
+ * file. The exact definition of hidden is system-dependent. On
289
+ * UNIX systems, a file is considered to be hidden if its name begins with
290
+ * a period character ('.'). On Microsoft Windows systems, a file is
291
+ * considered to be hidden if it has been marked as such in the filesystem.
292
+ *
293
+ * @return true if and only if the file denoted by this
294
+ * abstract pathname is hidden according to the conventions of the
295
+ * underlying platform
296
+ *
297
+ * @throws SecurityException
298
+ * If a security manager exists and its {@link
299
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
300
+ * method denies read access to the file
301
+ *
302
+ * @since 1.2
303
+ */
304
+ isHidden(): boolean;
305
+ /**
306
+ * Returns the size of the partition named by this
307
+ * abstract pathname.
308
+ *
309
+ * @return The size, in bytes, of the partition or `0L` if this
310
+ * abstract pathname does not name a partition
311
+ *
312
+ * @throws SecurityException
313
+ * If a security manager has been installed and it denies
314
+ * {@link RuntimePermission}`("getFileSystemAttributes")`
315
+ * or its {@link SecurityManager#checkRead(String)} method denies
316
+ * read access to the file named by this abstract pathname
317
+ *
318
+ * @since 1.6
319
+ */
320
+ getTotalSpace(): number;
321
+ /**
322
+ * Returns the number of unallocated bytes in the partition named by this abstract path name.
323
+ *
324
+ * The returned number of unallocated bytes is a hint, but not
325
+ * a guarantee, that it is possible to use most or any of these
326
+ * bytes. The number of unallocated bytes is most likely to be
327
+ * accurate immediately after this call. It is likely to be made
328
+ * inaccurate by any external I/O operations including those made
329
+ * on the system outside of this virtual machine. This method
330
+ * makes no guarantee that write operations to this file system
331
+ * will succeed.
332
+ *
333
+ * @return The number of unallocated bytes on the partition or `0L`
334
+ * if the abstract pathname does not name a partition. This
335
+ * value will be less than or equal to the total file system size
336
+ * returned by {@link #getTotalSpace}.
337
+ *
338
+ * @throws SecurityException
339
+ * If a security manager has been installed and it denies
340
+ * {@link RuntimePermission}`("getFileSystemAttributes")`
341
+ * or its {@link SecurityManager#checkRead(String)} method denies
342
+ * read access to the file named by this abstract pathname
343
+ *
344
+ * @since 1.6
345
+ */
346
+ getFreeSpace(): number;
347
+ /**
348
+ * Returns the number of bytes available to this virtual machine on the
349
+ * partition named by this abstract pathname. When
350
+ * possible, this method checks for write permissions and other operating
351
+ * system restrictions and will therefore usually provide a more accurate
352
+ * estimate of how much new data can actually be written than {@link
353
+ * #getFreeSpace}.
354
+ *
355
+ * The returned number of available bytes is a hint, but not a
356
+ * guarantee, that it is possible to use most or any of these bytes. The
357
+ * number of unallocated bytes is most likely to be accurate immediately
358
+ * after this call. It is likely to be made inaccurate by any external
359
+ * I/O operations including those made on the system outside of this
360
+ * virtual machine. This method makes no guarantee that write operations
361
+ * to this file system will succeed.
362
+ *
363
+ * @return The number of available bytes on the partition or `0L`
364
+ * if the abstract pathname does not name a partition. On
365
+ * systems where this information is not available, this method
366
+ * will be equivalent to a call to {@link #getFreeSpace}.
367
+ *
368
+ * @throws SecurityException
369
+ * If a security manager has been installed and it denies
370
+ * {@link RuntimePermission}`("getFileSystemAttributes")`
371
+ * or its {@link SecurityManager#checkRead(String)} method denies
372
+ * read access to the file named by this abstract pathname
373
+ *
374
+ * @since 1.6
375
+ */
376
+ getUsableSpace(): number;
377
+ }
378
+ export class PrintWriter {
379
+ /**
380
+ * Flushes the stream.
381
+ * @see #checkError()
382
+ */
383
+ flush(): void;
384
+ /**
385
+ * Writes a single character.
386
+ * @param c int specifying a character to be written.
387
+ */
388
+ write(c: number): void;
389
+ /**
390
+ * Writes A Portion of an array of characters.
391
+ * @param buf Array of characters
392
+ * @param off Offset from which to start writing characters
393
+ * @param len Number of characters to write
394
+ *
395
+ * @throws IndexOutOfBoundsException
396
+ * If the values of the `off` and `len` parameters
397
+ * cause the corresponding method of the underlying `Writer`
398
+ * to throw an `IndexOutOfBoundsException`
399
+ */
400
+ write(buf: string[], off: number, len: number): void;
401
+ /**
402
+ * Writes an array of characters. This method cannot be inherited from the
403
+ * Writer class because it must suppress I/O exceptions.
404
+ * @param buf Array of characters to be written
405
+ */
406
+ write(buf: string[]): void;
407
+ /**
408
+ * Writes a portion of a string.
409
+ * @param s A String
410
+ * @param off Offset from which to start writing characters
411
+ * @param len Number of characters to write
412
+ *
413
+ * @throws IndexOutOfBoundsException
414
+ * If the values of the `off` and `len` parameters
415
+ * cause the corresponding method of the underlying `Writer`
416
+ * to throw an `IndexOutOfBoundsException`
417
+ */
418
+ write(s: string, off: number, len: number): void;
419
+ /**
420
+ * Writes a string. This method cannot be inherited from the Writer class
421
+ * because it must suppress I/O exceptions.
422
+ * @param s String to be written
423
+ */
424
+ write(s: string): void;
425
+ /**
426
+ * Prints a boolean value. The string produced by {@link
427
+ * java.lang.String#valueOf(boolean)} is translated into bytes
428
+ * according to the platform's default character encoding, and these bytes
429
+ * are written in exactly the manner of the {@link
430
+ * #write(int)} method.
431
+ *
432
+ * @param b The `boolean` to be printed
433
+ */
434
+ print(b: boolean): void;
435
+ /**
436
+ * Prints a character. The character is translated into one or more bytes
437
+ * according to the platform's default character encoding, and these bytes
438
+ * are written in exactly the manner of the {@link
439
+ * #write(int)} method.
440
+ *
441
+ * @param c The `char` to be printed
442
+ */
443
+ print(c: string): void;
444
+ /**
445
+ * Prints an integer. The string produced by {@link
446
+ * java.lang.String#valueOf(int)} is translated into bytes according
447
+ * to the platform's default character encoding, and these bytes are
448
+ * written in exactly the manner of the {@link #write(int)}
449
+ * method.
450
+ *
451
+ * @param i The `int` to be printed
452
+ * @see java.lang.Integer#toString(int)
453
+ */
454
+ print(i: number): void;
455
+ /**
456
+ * Prints an array of characters. The characters are converted into bytes
457
+ * according to the platform's default character encoding, and these bytes
458
+ * are written in exactly the manner of the {@link #write(int)}
459
+ * method.
460
+ *
461
+ * @param s The array of chars to be printed
462
+ *
463
+ * @throws NullPointerException If `s` is `null`
464
+ */
465
+ print(s: string[]): void;
466
+ /**
467
+ * Prints an object. The string produced by the {@link
468
+ * java.lang.String#valueOf(Object)} method is translated into bytes
469
+ * according to the platform's default character encoding, and these bytes
470
+ * are written in exactly the manner of the {@link #write(int)}
471
+ * method.
472
+ *
473
+ * @param obj The `Object` to be printed
474
+ * @see java.lang.Object#toString()
475
+ */
476
+ print(obj: any): void;
477
+ /**
478
+ * Terminates the current line by writing the line separator string. The
479
+ * line separator string is defined by the system property
480
+ * `line.separator`, and is not necessarily a single newline
481
+ * character (`'\n'`).
482
+ */
483
+ println(): void;
484
+ /**
485
+ * Prints a boolean value and then terminates the line. This method behaves
486
+ * as though it invokes {@link #print(boolean)} and then
487
+ * {@link #println()}.
488
+ *
489
+ * @param x the `boolean` value to be printed
490
+ */
491
+ println(x: boolean): void;
492
+ /**
493
+ * Prints a character and then terminates the line. This method behaves as
494
+ * though it invokes {@link #print(char)} and then {@link
495
+ * #println()}.
496
+ *
497
+ * @param x the `char` value to be printed
498
+ */
499
+ println(x: string): void;
500
+ /**
501
+ * Prints an integer and then terminates the line. This method behaves as
502
+ * though it invokes {@link #print(int)} and then {@link
503
+ * #println()}.
504
+ *
505
+ * @param x the `int` value to be printed
506
+ */
507
+ println(x: number): void;
508
+ /**
509
+ * Prints an array of characters and then terminates the line. This method
510
+ * behaves as though it invokes {@link #print(char[])} and then
511
+ * {@link #println()}.
512
+ *
513
+ * @param x the array of `char` values to be printed
514
+ */
515
+ println(x: string[]): void;
516
+ /**
517
+ * Prints an Object and then terminates the line. This method calls
518
+ * at first String.valueOf(x) to get the printed object's string value,
519
+ * then behaves as
520
+ * though it invokes {@link #print(String)} and then
521
+ * {@link #println()}.
522
+ *
523
+ * @param x The `Object` to be printed.
524
+ */
525
+ println(x: any): void;
526
+ /**
527
+ * A convenience method to write a formatted string to this writer using
528
+ * the specified format string and arguments. If automatic flushing is
529
+ * enabled, calls to this method will flush the output buffer.
530
+ *
531
+ * An invocation of this method of the form
532
+ * `out.printf(format, args)`
533
+ * behaves in exactly the same way as the invocation
534
+ *
535
+ * {@code
536
+ * out.format(format, args)
537
+ * }
538
+ *
539
+ * @param format
540
+ * A format string as described in Format string syntax.
541
+ *
542
+ * @param args
543
+ * Arguments referenced by the format specifiers in the format
544
+ * string. If there are more arguments than format specifiers, the
545
+ * extra arguments are ignored. The number of arguments is
546
+ * variable and may be zero. The maximum number of arguments is
547
+ * limited by the maximum dimension of a Java array as defined by
548
+ * The Java™ Virtual Machine Specification.
549
+ * The behaviour on a
550
+ * `null` argument depends on the conversion.
551
+ *
552
+ * @throws java.util.IllegalFormatException
553
+ * If a format string contains an illegal syntax, a format
554
+ * specifier that is incompatible with the given arguments,
555
+ * insufficient arguments given the format string, or other
556
+ * illegal conditions. For specification of all possible
557
+ * formatting errors, see the Details section of the
558
+ * formatter class specification.
559
+ *
560
+ * @throws NullPointerException
561
+ * If the `format` is `null`
562
+ *
563
+ * @return This writer
564
+ *
565
+ * @since 1.5
566
+ */
567
+ printf(format: string, ...args: any[]): PrintWriter;
568
+ /**
569
+ * A convenience method to write a formatted string to this writer using
570
+ * the specified format string and arguments. If automatic flushing is
571
+ * enabled, calls to this method will flush the output buffer.
572
+ *
573
+ * An invocation of this method of the form
574
+ * `out.printf(l, format, args)`
575
+ * behaves in exactly the same way as the invocation
576
+ *
577
+ * {@code
578
+ * out.format(l, format, args)
579
+ * }
580
+ *
581
+ * @param l
582
+ * The {@linkplain java.util.Locale locale} to apply during
583
+ * formatting. If `l` is `null` then no localization
584
+ * is applied.
585
+ *
586
+ * @param format
587
+ * A format string as described in Format string syntax.
588
+ *
589
+ * @param args
590
+ * Arguments referenced by the format specifiers in the format
591
+ * string. If there are more arguments than format specifiers, the
592
+ * extra arguments are ignored. The number of arguments is
593
+ * variable and may be zero. The maximum number of arguments is
594
+ * limited by the maximum dimension of a Java array as defined by
595
+ * The Java™ Virtual Machine Specification.
596
+ * The behaviour on a
597
+ * `null` argument depends on the conversion.
598
+ *
599
+ * @throws java.util.IllegalFormatException
600
+ * If a format string contains an illegal syntax, a format
601
+ * specifier that is incompatible with the given arguments,
602
+ * insufficient arguments given the format string, or other
603
+ * illegal conditions. For specification of all possible
604
+ * formatting errors, see the Details section of the
605
+ * formatter class specification.
606
+ *
607
+ * @throws NullPointerException
608
+ * If the `format` is `null`
609
+ *
610
+ * @return This writer
611
+ *
612
+ * @since 1.5
613
+ */
614
+ printf(l: Locale, format: string, ...args: any[]): PrintWriter;
615
+ /**
616
+ * Writes a formatted string to this writer using the specified format
617
+ * string and arguments. If automatic flushing is enabled, calls to this
618
+ * method will flush the output buffer.
619
+ *
620
+ * The locale always used is the one returned by {@link
621
+ * java.util.Locale#getDefault() Locale.getDefault()}, regardless of any
622
+ * previous invocations of other formatting methods on this object.
623
+ *
624
+ * @param format
625
+ * A format string as described in Format string syntax.
626
+ *
627
+ * @param args
628
+ * Arguments referenced by the format specifiers in the format
629
+ * string. If there are more arguments than format specifiers, the
630
+ * extra arguments are ignored. The number of arguments is
631
+ * variable and may be zero. The maximum number of arguments is
632
+ * limited by the maximum dimension of a Java array as defined by
633
+ * The Java™ Virtual Machine Specification.
634
+ * The behaviour on a
635
+ * `null` argument depends on the conversion.
636
+ *
637
+ * @throws java.util.IllegalFormatException
638
+ * If a format string contains an illegal syntax, a format
639
+ * specifier that is incompatible with the given arguments,
640
+ * insufficient arguments given the format string, or other
641
+ * illegal conditions. For specification of all possible
642
+ * formatting errors, see the Details section of the
643
+ * Formatter class specification.
644
+ *
645
+ * @throws NullPointerException
646
+ * If the `format` is `null`
647
+ *
648
+ * @return This writer
649
+ *
650
+ * @since 1.5
651
+ */
652
+ format(format: string, ...args: any[]): PrintWriter;
653
+ /**
654
+ * Writes a formatted string to this writer using the specified format
655
+ * string and arguments. If automatic flushing is enabled, calls to this
656
+ * method will flush the output buffer.
657
+ *
658
+ * @param l
659
+ * The {@linkplain java.util.Locale locale} to apply during
660
+ * formatting. If `l` is `null` then no localization
661
+ * is applied.
662
+ *
663
+ * @param format
664
+ * A format string as described in Format string syntax.
665
+ *
666
+ * @param args
667
+ * Arguments referenced by the format specifiers in the format
668
+ * string. If there are more arguments than format specifiers, the
669
+ * extra arguments are ignored. The number of arguments is
670
+ * variable and may be zero. The maximum number of arguments is
671
+ * limited by the maximum dimension of a Java array as defined by
672
+ * The Java™ Virtual Machine Specification.
673
+ * The behaviour on a
674
+ * `null` argument depends on the conversion.
675
+ *
676
+ * @throws java.util.IllegalFormatException
677
+ * If a format string contains an illegal syntax, a format
678
+ * specifier that is incompatible with the given arguments,
679
+ * insufficient arguments given the format string, or other
680
+ * illegal conditions. For specification of all possible
681
+ * formatting errors, see the Details section of the
682
+ * formatter class specification.
683
+ *
684
+ * @throws NullPointerException
685
+ * If the `format` is `null`
686
+ *
687
+ * @return This writer
688
+ *
689
+ * @since 1.5
690
+ */
691
+ format(l: Locale, format: string, ...args: any[]): PrintWriter;
692
+ }
693
+
694
+ }