java.lang.Object
tools.jackson.databind.ser.WritableObjectId
Simple value container used to keep track of Object Ids during
serialization.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ObjectIdGenerator<?>
protected boolean
Marker to denote whether Object Id value has been written as part of an Object, to be referencible. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateId
(Object forPojo) void
Method called to output Object Id declaration, either using native Object Id write methodJsonGenerator.writeObjectId(Object)
(if allowed), or, if not, just writing it as an Object property with specified property name and id value.boolean
Method to call to write a reference to object that this id refers.
-
Field Details
-
generator
-
id
-
idWritten
protected boolean idWrittenMarker to denote whether Object Id value has been written as part of an Object, to be referencible. Remains false when forward-reference is written.
-
-
Constructor Details
-
WritableObjectId
-
-
Method Details
-
writeAsReference
public boolean writeAsReference(JsonGenerator g, SerializationContext ctxt, ObjectIdWriter w) throws JacksonException Method to call to write a reference to object that this id refers. Usually this is done after an earlier call towriteAsDeclaration(tools.jackson.core.JsonGenerator, tools.jackson.databind.SerializationContext, tools.jackson.databind.ser.impl.ObjectIdWriter)
.- Throws:
JacksonException
-
generateId
-
writeAsDeclaration
public void writeAsDeclaration(JsonGenerator g, SerializationContext ctxt, ObjectIdWriter w) throws JacksonException Method called to output Object Id declaration, either using native Object Id write methodJsonGenerator.writeObjectId(Object)
(if allowed), or, if not, just writing it as an Object property with specified property name and id value.- Throws:
JacksonException
-