public class PropertyValueBuffer
extends java.lang.Object
PropertyValue
s.
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 and Description |
---|
PropertyValueBuffer(JsonParser p,
DeserializationContext ctxt,
int paramCount,
ObjectIdReader oir) |
Modifier and Type | Method and Description |
---|---|
boolean |
assignParameter(SettableBeanProperty prop,
java.lang.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.
|
void |
bufferAnyProperty(SettableAnyProperty prop,
java.lang.String propName,
java.lang.Object value) |
void |
bufferMapProperty(java.lang.Object key,
java.lang.Object value) |
void |
bufferProperty(SettableBeanProperty prop,
java.lang.Object value) |
java.lang.Object |
getParameter(SettableBeanProperty prop)
A variation of
getParameters(SettableBeanProperty[]) that
accepts a single property. |
java.lang.Object[] |
getParameters(SettableBeanProperty[] props)
Method called to do necessary post-processing such as injection of values
and verification of values for required properties,
after either
assignParameter(SettableBeanProperty, Object)
returns true (to indicate all creator properties are found), or when
then whole JSON Object has been processed, |
java.lang.Object |
handleIdValue(DeserializationContext ctxt,
java.lang.Object bean)
Helper method called to handle Object Id value collected earlier, if any
|
boolean |
hasParameter(SettableBeanProperty prop)
Returns
true if the given property was seen in the JSON source by
this buffer. |
boolean |
isComplete() |
boolean |
readIdProperty(java.lang.String propName)
Helper method called to see if given non-creator property is the "id property";
and if so, handle appropriately.
|
public PropertyValueBuffer(JsonParser p, DeserializationContext ctxt, int paramCount, ObjectIdReader oir)
public final boolean hasParameter(SettableBeanProperty prop)
true
if the given property was seen in the JSON source by
this buffer.public java.lang.Object getParameter(SettableBeanProperty prop) throws JsonMappingException
getParameters(SettableBeanProperty[])
that
accepts a single property. Whereas the plural form eagerly fetches and
validates all properties, this method may be used (along with
hasParameter(SettableBeanProperty)
) to let applications only
fetch the properties defined in the JSON source itself, and to have some
other customized behavior for missing properties.JsonMappingException
public java.lang.Object[] getParameters(SettableBeanProperty[] props) throws JsonMappingException
assignParameter(SettableBeanProperty, Object)
returns true
(to indicate all creator properties are found), or when
then whole JSON Object has been processed,JsonMappingException
public boolean readIdProperty(java.lang.String propName) throws java.io.IOException
java.io.IOException
public java.lang.Object handleIdValue(DeserializationContext ctxt, java.lang.Object bean) throws java.io.IOException
java.io.IOException
public boolean isComplete()
public boolean assignParameter(SettableBeanProperty prop, java.lang.Object value)
public void bufferProperty(SettableBeanProperty prop, java.lang.Object value)
public void bufferAnyProperty(SettableAnyProperty prop, java.lang.String propName, java.lang.Object value)
public void bufferMapProperty(java.lang.Object key, java.lang.Object value)
Copyright © 2010 - 2020 Adobe. All Rights Reserved