Sha256: 86094a5e9170203b0e9ce4ae30fe4de6524098c95f4fa38e2d4826e5748f4e2b
Contents?: true
Size: 1.42 KB
Versions: 164
Compression:
Stored size: 1.42 KB
Contents
package sh.calaba.org.codehaus.jackson.map.deser.impl; import java.io.IOException; import sh.calaba.org.codehaus.jackson.map.BeanProperty; import sh.calaba.org.codehaus.jackson.map.DeserializationContext; import sh.calaba.org.codehaus.jackson.map.introspect.AnnotatedMember; import sh.calaba.org.codehaus.jackson.map.util.Annotations; import sh.calaba.org.codehaus.jackson.type.JavaType; /** * Class that encapsulates details of value injection that occurs before * deserialization of a POJO. Details include information needed to find * injectable value (logical id) as well as method used for assigning * value (setter or field) * * @since 1.9 */ public class ValueInjector extends BeanProperty.Std { /** * Identifier used for looking up value to inject */ protected final Object _valueId; public ValueInjector(String propertyName, JavaType type, Annotations contextAnnotations, AnnotatedMember mutator, Object valueId) { super(propertyName, type, contextAnnotations, mutator); _valueId = valueId; } public Object findValue(DeserializationContext context, Object beanInstance) { return context.findInjectableValue(_valueId, this, beanInstance); } public void inject(DeserializationContext context, Object beanInstance) throws IOException { _member.setValue(beanInstance, findValue(context, beanInstance)); } }
Version data entries
164 entries across 164 versions & 2 rubygems