Package com.fasterxml.jackson.jr.ob.comp
Class ObjectComposer<PARENT extends ComposerBase>
- java.lang.Object
-
- com.fasterxml.jackson.jr.ob.comp.ComposerBase
-
- com.fasterxml.jackson.jr.ob.comp.ObjectComposer<PARENT>
-
- All Implemented Interfaces:
java.io.Flushable
public class ObjectComposer<PARENT extends ComposerBase> extends ComposerBase
-
-
Field Summary
Fields Modifier and Type Field Description protected com.fasterxml.jackson.core.JsonGenerator
_generator
protected PARENT
_parent
-
Fields inherited from class com.fasterxml.jackson.jr.ob.comp.ComposerBase
_child, _open
-
-
Constructor Summary
Constructors Constructor Description ObjectComposer(PARENT parent, com.fasterxml.jackson.core.JsonGenerator g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_closeChild()
protected java.lang.Object
_finish()
protected ObjectComposer<PARENT>
_start()
PARENT
end()
void
flush()
ObjectComposer<PARENT>
put(java.lang.String fieldName, boolean value)
ObjectComposer<PARENT>
put(java.lang.String fieldName, double value)
ObjectComposer<PARENT>
put(java.lang.String fieldName, int value)
ObjectComposer<PARENT>
put(java.lang.String fieldName, long value)
ObjectComposer<PARENT>
put(java.lang.String fieldName, java.lang.CharSequence value)
ObjectComposer<PARENT>
put(java.lang.String fieldName, java.lang.String value)
ObjectComposer<PARENT>
putNull(java.lang.String fieldName)
ObjectComposer<PARENT>
putObject(java.lang.String fieldName, java.lang.Object value)
Method used to put a Java Object ("POJO") value into Object being composed: this requires that the underlyingJsonGenerator
has a properly configuredObjectCodec
to use for serializer object.ArrayComposer<ObjectComposer<PARENT>>
startArrayField(com.fasterxml.jackson.core.SerializableString fieldName)
ArrayComposer<ObjectComposer<PARENT>>
startArrayField(java.lang.String fieldName)
ObjectComposer<ObjectComposer<PARENT>>
startObjectField(com.fasterxml.jackson.core.SerializableString fieldName)
ObjectComposer<ObjectComposer<PARENT>>
startObjectField(java.lang.String fieldName)
-
Methods inherited from class com.fasterxml.jackson.jr.ob.comp.ComposerBase
_childClosed, _illegalCall, _safeFinish, _startArray, _startCollection, _startMap, _startObject
-
-
-
-
Field Detail
-
_parent
protected final PARENT extends ComposerBase _parent
-
_generator
protected final com.fasterxml.jackson.core.JsonGenerator _generator
-
-
Constructor Detail
-
ObjectComposer
public ObjectComposer(PARENT parent, com.fasterxml.jackson.core.JsonGenerator g)
-
-
Method Detail
-
flush
public void flush() throws java.io.IOException
- Throws:
java.io.IOException
-
_start
protected ObjectComposer<PARENT> _start() throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Specified by:
_start
in classComposerBase
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
_finish
protected java.lang.Object _finish() throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Specified by:
_finish
in classComposerBase
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
startArrayField
public ArrayComposer<ObjectComposer<PARENT>> startArrayField(java.lang.String fieldName) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
startArrayField
public ArrayComposer<ObjectComposer<PARENT>> startArrayField(com.fasterxml.jackson.core.SerializableString fieldName) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
startObjectField
public ObjectComposer<ObjectComposer<PARENT>> startObjectField(java.lang.String fieldName) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
startObjectField
public ObjectComposer<ObjectComposer<PARENT>> startObjectField(com.fasterxml.jackson.core.SerializableString fieldName) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
end
public PARENT end() throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
put
public ObjectComposer<PARENT> put(java.lang.String fieldName, boolean value) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
putNull
public ObjectComposer<PARENT> putNull(java.lang.String fieldName) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
putObject
public ObjectComposer<PARENT> putObject(java.lang.String fieldName, java.lang.Object value) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
Method used to put a Java Object ("POJO") value into Object being composed: this requires that the underlyingJsonGenerator
has a properly configuredObjectCodec
to use for serializer object.- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
- Since:
- 2.6
-
put
public ObjectComposer<PARENT> put(java.lang.String fieldName, int value) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
put
public ObjectComposer<PARENT> put(java.lang.String fieldName, long value) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
put
public ObjectComposer<PARENT> put(java.lang.String fieldName, double value) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
put
public ObjectComposer<PARENT> put(java.lang.String fieldName, java.lang.String value) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
put
public ObjectComposer<PARENT> put(java.lang.String fieldName, java.lang.CharSequence value) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
_closeChild
protected void _closeChild() throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-
-