Class PropertyValueBuffer
java.lang.Object
com.fasterxml.jackson.databind.deser.impl.PropertyValueBuffer
Simple container used for temporarily buffering a set of
PropertyValues.
Using during construction of beans (and Maps) that use Creators,
and hence need buffering before instance (that will have properties
to assign values to) is constructed.-
Constructor Summary
ConstructorsConstructorDescriptionPropertyValueBuffer(JsonParser p, DeserializationContext ctxt, int paramCount, ObjectIdReader oir) -
Method Summary
Modifier and TypeMethodDescriptionbooleanassignParameter(SettableBeanProperty prop, Object value) Method called to buffer value for given property, as well as check whether we now have values for all (creator) properties that we expect to get values for.voidbufferAnyProperty(SettableAnyProperty prop, String propName, Object value) voidbufferMapProperty(Object key, Object value) voidbufferProperty(SettableBeanProperty prop, Object value) A variation ofgetParameters(SettableBeanProperty[])that accepts a single property.Object[]getParameters(SettableBeanProperty[] props) Method called to do necessary post-processing such as injection of values and verification of values for required properties, after eitherassignParameter(SettableBeanProperty, Object)returnstrue(to indicate all creator properties are found), or when then whole JSON Object has been processed,handleIdValue(DeserializationContext ctxt, Object bean) Helper method called to handle Object Id value collected earlier, if anyfinal booleanReturnstrueif the given property was seen in the JSON source by this buffer.booleanbooleanreadIdProperty(String propName) Helper method called to see if given non-creator property is the "id property"; and if so, handle appropriately.
-
Constructor Details
-
PropertyValueBuffer
public PropertyValueBuffer(JsonParser p, DeserializationContext ctxt, int paramCount, ObjectIdReader oir)
-
-
Method Details
-
hasParameter
Returnstrueif the given property was seen in the JSON source by this buffer.- Since:
- 2.8
-
getParameter
A variation ofgetParameters(SettableBeanProperty[])that accepts a single property. Whereas the plural form eagerly fetches and validates all properties, this method may be used (along withhasParameter(SettableBeanProperty)) to let applications only fetch the properties defined in the JSON source itself, and to have some other customized behavior for missing properties.- Throws:
JsonMappingException- Since:
- 2.8
-
getParameters
Method called to do necessary post-processing such as injection of values and verification of values for required properties, after eitherassignParameter(SettableBeanProperty, Object)returnstrue(to indicate all creator properties are found), or when then whole JSON Object has been processed,- Throws:
JsonMappingException
-
readIdProperty
Helper method called to see if given non-creator property is the "id property"; and if so, handle appropriately.- Throws:
IOException- Since:
- 2.1
-
handleIdValue
Helper method called to handle Object Id value collected earlier, if any- Throws:
IOException
-
isComplete
public boolean isComplete() -
assignParameter
Method called to buffer value for given property, as well as check whether we now have values for all (creator) properties that we expect to get values for.- Returns:
- True if we have received all creator parameters
- Since:
- 2.6
-
bufferProperty
-
bufferAnyProperty
-
bufferMapProperty
-