@@ -24,9 +24,9 @@ public class JsonGeneratorDelegate extends JsonGenerator
24
24
protected boolean delegateCopyMethods ;
25
25
26
26
/*
27
- /**********************************************************
27
+ /**********************************************************************
28
28
/* Construction, initialization
29
- /**********************************************************
29
+ /**********************************************************************
30
30
*/
31
31
32
32
public JsonGeneratorDelegate (JsonGenerator d ) {
@@ -55,9 +55,9 @@ public void setCurrentValue(Object v) {
55
55
}
56
56
57
57
/*
58
- /**********************************************************
58
+ /**********************************************************************
59
59
/* Public API, metadata
60
- /**********************************************************
60
+ /**********************************************************************
61
61
*/
62
62
63
63
@ Override public ObjectCodec getCodec () { return delegate .getCodec (); }
@@ -74,9 +74,9 @@ public void setCurrentValue(Object v) {
74
74
@ Override public int getOutputBuffered () { return delegate .getOutputBuffered (); }
75
75
76
76
/*
77
- /**********************************************************
78
- /* Public API, capability introspection (since 2.3, mostly)
79
- /**********************************************************
77
+ /**********************************************************************
78
+ /* Public API, capability introspection
79
+ /**********************************************************************
80
80
*/
81
81
82
82
@ Override
@@ -103,9 +103,9 @@ public JacksonFeatureSet<StreamWriteCapability> getWriteCapabilities() {
103
103
}
104
104
105
105
/*
106
- /**********************************************************
106
+ /**********************************************************************
107
107
/* Public API, configuration
108
- /**********************************************************
108
+ /**********************************************************************
109
109
*/
110
110
111
111
@ Override
@@ -149,9 +149,9 @@ public JsonGenerator overrideFormatFeatures(int values, int mask) {
149
149
}
150
150
151
151
/*
152
- /**********************************************************
152
+ /**********************************************************************
153
153
/* Configuring generator
154
- /**********************************************************
154
+ /**********************************************************************
155
155
*/
156
156
157
157
@ Override
@@ -186,9 +186,9 @@ public JsonGenerator setPrettyPrinter(PrettyPrinter pp) {
186
186
return this ; }
187
187
188
188
/*
189
- /**********************************************************
189
+ /**********************************************************************
190
190
/* Public API, write methods, structural
191
- /**********************************************************
191
+ /**********************************************************************
192
192
*/
193
193
194
194
@ Override
@@ -257,9 +257,9 @@ public void writeArray(String[] array, int offset, int length) throws IOExceptio
257
257
}
258
258
259
259
/*
260
- /**********************************************************
260
+ /**********************************************************************
261
261
/* Public API, write methods, text/String values
262
- /**********************************************************
262
+ /**********************************************************************
263
263
*/
264
264
265
265
@ Override
@@ -283,9 +283,9 @@ public void writeString(Reader reader, int len) throws IOException {
283
283
public void writeUTF8String (byte [] text , int offset , int length ) throws IOException { delegate .writeUTF8String (text , offset , length ); }
284
284
285
285
/*
286
- /**********************************************************
286
+ /**********************************************************************
287
287
/* Public API, write methods, binary/raw content
288
- /**********************************************************
288
+ /**********************************************************************
289
289
*/
290
290
291
291
@ Override
@@ -319,9 +319,9 @@ public void writeString(Reader reader, int len) throws IOException {
319
319
public int writeBinary (Base64Variant b64variant , InputStream data , int dataLength ) throws IOException { return delegate .writeBinary (b64variant , data , dataLength ); }
320
320
321
321
/*
322
- /**********************************************************
322
+ /**********************************************************************
323
323
/* Public API, write methods, other value types
324
- /**********************************************************
324
+ /**********************************************************************
325
325
*/
326
326
327
327
@ Override
@@ -358,9 +358,9 @@ public void writeString(Reader reader, int len) throws IOException {
358
358
public void writeNull () throws IOException { delegate .writeNull (); }
359
359
360
360
/*
361
- /**********************************************************
361
+ /**********************************************************************
362
362
/* Public API, convenience field-write methods
363
- /**********************************************************
363
+ /**********************************************************************
364
364
*/
365
365
366
366
// 04-Oct-2019, tatu: Reminder: these should NOT be delegated, unless matching
@@ -375,6 +375,7 @@ public void writeString(Reader reader, int len) throws IOException {
375
375
// public void writeArrayFieldStart(String fieldName) throws IOException {
376
376
// public void writeObjectFieldStart(String fieldName) throws IOException {
377
377
// public void writeObjectField(String fieldName, Object pojo) throws IOException {
378
+ // public void writePOJOField(String fieldName, Object pojo) throws IOException {
378
379
379
380
// Sole exception being this method as it is not a "combo" method
380
381
@@ -384,9 +385,9 @@ public void writeOmittedField(String fieldName) throws IOException {
384
385
}
385
386
386
387
/*
387
- /**********************************************************
388
+ /**********************************************************************
388
389
/* Public API, write methods, Native Ids
389
- /**********************************************************
390
+ /**********************************************************************
390
391
*/
391
392
392
393
@ Override
@@ -402,11 +403,16 @@ public void writeOmittedField(String fieldName) throws IOException {
402
403
public void writeEmbeddedObject (Object object ) throws IOException { delegate .writeEmbeddedObject (object ); }
403
404
404
405
/*
405
- /**********************************************************
406
+ /**********************************************************************
406
407
/* Public API, write methods, serializing Java objects
407
- /**********************************************************
408
+ /**********************************************************************
408
409
*/
409
-
410
+
411
+ @ Override // since 2.13
412
+ public void writePOJO (Object pojo ) throws IOException {
413
+ writeObject (pojo );
414
+ }
415
+
410
416
@ Override
411
417
public void writeObject (Object pojo ) throws IOException {
412
418
if (delegateCopyMethods ) {
@@ -444,17 +450,17 @@ public void writeTree(TreeNode tree) throws IOException {
444
450
}
445
451
446
452
/*
447
- /**********************************************************
453
+ /**********************************************************************
448
454
/* Public API, convenience field write methods
449
- /**********************************************************
455
+ /**********************************************************************
450
456
*/
451
457
452
458
// // These are fine, just delegate to other methods...
453
459
454
460
/*
455
- /**********************************************************
461
+ /**********************************************************************
456
462
/* Public API, copy-through methods
457
- /**********************************************************
463
+ /**********************************************************************
458
464
*/
459
465
460
466
@ Override
@@ -470,34 +476,28 @@ public void copyCurrentStructure(JsonParser p) throws IOException {
470
476
}
471
477
472
478
/*
473
- /**********************************************************
479
+ /**********************************************************************
474
480
/* Public API, context access
475
- /**********************************************************
481
+ /**********************************************************************
476
482
*/
477
483
478
484
@ Override public JsonStreamContext getOutputContext () { return delegate .getOutputContext (); }
479
485
480
486
/*
481
- /**********************************************************
487
+ /**********************************************************************
482
488
/* Public API, buffer handling
483
- /**********************************************************
489
+ /**********************************************************************
484
490
*/
485
491
486
492
@ Override public void flush () throws IOException { delegate .flush (); }
487
493
@ Override public void close () throws IOException { delegate .close (); }
488
494
489
- /*
490
- /**********************************************************
491
- /* Closeable implementation
492
- /**********************************************************
493
- */
494
-
495
495
@ Override public boolean isClosed () { return delegate .isClosed (); }
496
496
497
497
/*
498
- /**********************************************************
498
+ /**********************************************************************
499
499
/* Extended API
500
- /**********************************************************
500
+ /**********************************************************************
501
501
*/
502
502
503
503
@ Deprecated // since 2.11
0 commit comments