Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.databind.deser.impl

public Class ReadableObjectId

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.Collections, .Iterator, .LinkedList, com.fasterxml.jackson.annotation.ObjectIdGenerator, .ObjectIdResolver, com.fasterxml.jackson.core.JsonLocation, com.fasterxml.jackson.databind.DeserializationContext, .JavaType, com.fasterxml.jackson.databind.deser.UnresolvedForwardReference

Simple value container for containing information about single Object Id during deserialization

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class

Field Summary

Modifier and TypeField and Description
protected Object
protected final ObjectIdGenerator.IdKey
protected LinkedList<ReadableObjectId.Referring>
protected ObjectIdResolver

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
bindItem(Object ob)

Method called to assign actual POJO to which ObjectId refers to: will also handle referring properties, if any, by assigning POJO.

public ObjectIdGenerator.IdKey
public ObjectIdResolver

Returns:

The registered resolver
getResolver
()

Allow access to the resolver in case anybody wants to use it directly, for examples from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext#tryToResolveUnresolvedObjectId.

public boolean
public Iterator<ReadableObjectId.Referring>
public Object
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public boolean

Returns:

True, if resolution succeeded (and no error needs to be reported); false to indicate resolution did not succeed.
tryToResolveUnresolved
(DeserializationContext ctxt)

Method called by DeserializationContext at the end of deserialization if this Object Id was not resolved during normal processing.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_itemback to summary
protected Object _item
Since
2.8 (with this name, formerly `public Object item`)
_keyback to summary
protected final ObjectIdGenerator.IdKey _key
_referringPropertiesback to summary
protected LinkedList<ReadableObjectId.Referring> _referringProperties
_resolverback to summary
protected ObjectIdResolver _resolver

Constructor Detail

ReadableObjectIdback to summary
public ReadableObjectId(ObjectIdGenerator.IdKey key)

Method Detail

appendReferringback to summary
public void appendReferring(ReadableObjectId.Referring currentReferring)
bindItemback to summary
public void bindItem(Object ob) throws IOException

Method called to assign actual POJO to which ObjectId refers to: will also handle referring properties, if any, by assigning POJO.

getKeyback to summary
public ObjectIdGenerator.IdKey getKey()
getResolverback to summary
public ObjectIdResolver getResolver()

Allow access to the resolver in case anybody wants to use it directly, for examples from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext#tryToResolveUnresolvedObjectId.

Returns:ObjectIdResolver

The registered resolver

Since
2.7
hasReferringPropertiesback to summary
public boolean hasReferringProperties()
referringPropertiesback to summary
public Iterator<ReadableObjectId.Referring> referringProperties()
resolveback to summary
public Object resolve()
setResolverback to summary
public void setResolver(ObjectIdResolver resolver)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
tryToResolveUnresolvedback to summary
public boolean tryToResolveUnresolved(DeserializationContext ctxt)

Method called by DeserializationContext at the end of deserialization if this Object Id was not resolved during normal processing. Call is made to allow custom implementations to use alternative resolution strategies; currently the only way to make use of this functionality is by sub-classing ReadableObjectId and overriding this method.

Default implementation simply returns false to indicate that resolution attempt did not succeed.

Returns:boolean

True, if resolution succeeded (and no error needs to be reported); false to indicate resolution did not succeed.

Since
2.6
com.fasterxml.jackson.databind.deser.impl back to summary

public abstract Class ReadableObjectId.Referring

extends Object
Class Inheritance
  • java.lang.Object
  • com.fasterxml.jackson.databind.deser.impl.ReadableObjectId.Referring
Known Direct Subclasses
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.CollectionReferring, com.fasterxml.jackson.databind.deser.std.MapDeserializer.MapReferring, com.fasterxml.jackson.databind.deser.BeanDeserializer.BeanReferring, com.fasterxml.jackson.databind.deser.SettableAnyProperty.AnySetterReferring, com.fasterxml.jackson.databind.deser.impl.ObjectIdReferenceProperty.PropertyReferring

Field Summary

Modifier and TypeField and Description
private final Class<?>
private final UnresolvedForwardReference

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public Class<?>
public JsonLocation
public abstract void
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_beanTypeback to summary
private final Class<?> _beanType
_referenceback to summary
private final UnresolvedForwardReference _reference

Constructor Detail

Referringback to summary
public Referring(UnresolvedForwardReference ref, Class<?> beanType)
Referringback to summary
public Referring(UnresolvedForwardReference ref, JavaType beanType)

Method Detail

getBeanTypeback to summary
public Class<?> getBeanType()
getLocationback to summary
public JsonLocation getLocation()
handleResolvedForwardReferenceback to summary
public abstract void handleResolvedForwardReference(Object id, Object value) throws IOException
hasIdback to summary
public boolean hasId(Object id)