public class ObjectIdReader extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected JsonDeserializer<Object> |
_deserializer
Deserializer used for deserializing id values.
|
protected JavaType |
_idType |
com.fasterxml.jackson.annotation.ObjectIdGenerator<?> |
generator
Blueprint generator instance: actual instance will be
fetched from
SerializerProvider using this as
the key. |
SettableBeanProperty |
idProperty |
PropertyName |
propertyName |
com.fasterxml.jackson.annotation.ObjectIdResolver |
resolver |
Modifier | Constructor and Description |
---|---|
protected |
ObjectIdReader(JavaType t,
PropertyName propName,
com.fasterxml.jackson.annotation.ObjectIdGenerator<?> gen,
JsonDeserializer<?> deser,
SettableBeanProperty idProp,
com.fasterxml.jackson.annotation.ObjectIdResolver resolver) |
Modifier and Type | Method and Description |
---|---|
static ObjectIdReader |
construct(JavaType idType,
PropertyName propName,
com.fasterxml.jackson.annotation.ObjectIdGenerator<?> generator,
JsonDeserializer<?> deser,
SettableBeanProperty idProp,
com.fasterxml.jackson.annotation.ObjectIdResolver resolver)
Factory method called by
BeanSerializerBase
with the initial information based on standard settings for the type
for which serializer is being built. |
JsonDeserializer<Object> |
getDeserializer() |
JavaType |
getIdType() |
boolean |
isValidReferencePropertyName(String name,
com.fasterxml.jackson.core.JsonParser parser)
Convenience method, equivalent to calling:
readerInstance.generator.isValidReferencePropertyName(name, parser);
and used to determine whether Object Ids handled by the underlying
generator may be in form of (JSON) Objects. |
boolean |
maySerializeAsObject()
Convenience method, equivalent to calling:
readerInstance.generator.maySerializeAsObject();
and used to determine whether Object Ids handled by the underlying
generator may be in form of (JSON) Objects. |
Object |
readObjectReference(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
Method called to read value that is expected to be an Object Reference
(that is, value of an Object Id used to refer to another object).
|
protected final JavaType _idType
public final PropertyName propertyName
public final com.fasterxml.jackson.annotation.ObjectIdGenerator<?> generator
SerializerProvider
using this as
the key.public final com.fasterxml.jackson.annotation.ObjectIdResolver resolver
protected final JsonDeserializer<Object> _deserializer
public final SettableBeanProperty idProperty
protected ObjectIdReader(JavaType t, PropertyName propName, com.fasterxml.jackson.annotation.ObjectIdGenerator<?> gen, JsonDeserializer<?> deser, SettableBeanProperty idProp, com.fasterxml.jackson.annotation.ObjectIdResolver resolver)
public static ObjectIdReader construct(JavaType idType, PropertyName propName, com.fasterxml.jackson.annotation.ObjectIdGenerator<?> generator, JsonDeserializer<?> deser, SettableBeanProperty idProp, com.fasterxml.jackson.annotation.ObjectIdResolver resolver)
BeanSerializerBase
with the initial information based on standard settings for the type
for which serializer is being built.public JsonDeserializer<Object> getDeserializer()
public JavaType getIdType()
public boolean maySerializeAsObject()
readerInstance.generator.maySerializeAsObject();
and used to determine whether Object Ids handled by the underlying
generator may be in form of (JSON) Objects.
Used for optimizing handling in cases where method returns false.public boolean isValidReferencePropertyName(String name, com.fasterxml.jackson.core.JsonParser parser)
readerInstance.generator.isValidReferencePropertyName(name, parser);
and used to determine whether Object Ids handled by the underlying
generator may be in form of (JSON) Objects.
Used for optimizing handling in cases where method returns false.public Object readObjectReference(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException
IOException
Copyright © 2008–2023 FasterXML. All rights reserved.