@Override public void assign(Object bean) throws IOException, JsonProcessingException { _property.set(bean, value); } }
@Override public void set(Object instance, Object value) throws IOException { // 31-Oct-2016, tatu: Basically should just ignore as null can't really // contribute to merging. if (value != null) { delegate.set(instance, value); } }
@Override public void set(Object instance, Object value) throws IOException { delegate.set(instance, value); }
@Override public void set(Object instance, Object value) throws IOException { _forward.set(instance, value); }
@Override public void set(Object instance, Object value) throws IOException { _verifySetter(); _fallbackSetter.set(instance, value); }
@Override public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException { _verifySetter(); _fallbackSetter.set(instance, deserialize(p, ctxt)); }
@Override public void handleResolvedForwardReference(Object id, Object value) throws IOException { if (_bean == null) { _context.reportInputMismatch(_prop, "Cannot resolve ObjectId forward reference using property '%s' (of type %s): Bean not yet resolved", _prop.getName(), _prop.getDeclaringClass().getName()); } _prop.set(_bean, value); } }
@Override public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException { Object oldValue = _accessor.getValue(instance); Object newValue; // 20-Oct-2016, tatu: Couple of possibilities of how to proceed; for // now, default to "normal" handling without merging if (oldValue == null) { newValue = delegate.deserialize(p, ctxt); } else { newValue = delegate.deserializeWith(p, ctxt, oldValue); } if (newValue != oldValue) { // 18-Apr-2017, tatu: Null handling should occur within delegate, which may // set/skip/transform it, or throw an exception. delegate.set(instance, newValue); } }
@SuppressWarnings("resource") protected final void _deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object bean, int index, String typeId) throws IOException { /* Ok: time to mix type id, value; and we will actually use "wrapper-array" * style to ensure we can handle all kinds of JSON constructs. */ JsonParser p2 = _tokens[index].asParser(p); JsonToken t = p2.nextToken(); // 29-Sep-2015, tatu: As per [databind#942], nulls need special support if (t == JsonToken.VALUE_NULL) { _properties[index].getProperty().set(bean, null); return; } TokenBuffer merged = new TokenBuffer(p, ctxt); merged.writeStartArray(); merged.writeString(typeId); merged.copyCurrentStructure(p2); merged.writeEndArray(); // needs to point to START_OBJECT (or whatever first token is) JsonParser mp = merged.asParser(p); mp.nextToken(); _properties[index].getProperty().deserializeAndSet(mp, ctxt, bean); }
if (bean == null) { bean = _valueInstantiator.createUsingDefault(ctxt); property.set(bean, id);
Object result = TypeDeserializer.deserializeIfNatural(buffered, ctxt, extProp.getType()); if (result != null) { extProp.set(bean, result); continue;
SettableBeanProperty prop = _properties[i].getProperty(); if (prop.getCreatorIndex() < 0) { prop.set(bean, values[i]);
@Override public void set(Object instance, Object value) throws IOException { // 31-Oct-2016, tatu: Basically should just ignore as null can't really // contribute to merging. if (value != null) { delegate.set(instance, value); } }
@Override public void assign(Object bean) throws IOException, JsonProcessingException { _property.set(bean, value); } }
@Override public final void set(Object instance, Object value) throws IOException { _delegate.set(instance, value); }
@Override public void assign(Object bean) throws IOException, JsonProcessingException { _property.set(bean, value); } }
@Override public void set(Object instance, Object value) throws IOException { /* Hmmmh. Should we return quietly (NOP), or error? * Perhaps better to throw an exception, since it's generally an error. */ if (_fallbackSetter == null) { throw new IllegalStateException("No fallback setter/field defined: can not use creator property for " +getClass().getName()); } _fallbackSetter.set(instance, value); }
@Override public void set(Object instance, Object value) throws IOException { /* Hmmmh. Should we return quietly (NOP), or error? * Perhaps better to throw an exception, since it's generally an error. */ if (_fallbackSetter == null) { throw new IllegalStateException("No fallback setter/field defined: can not use creator property for " +getClass().getName()); } _fallbackSetter.set(instance, value); }