public Object findValue(DeserializationContext context, Object beanInstance) throws JsonMappingException { return context.findInjectableValue(_valueId, this, beanInstance); }
/** * Method that can be called to locate value to be injected for this * property, if it is configured for this. */ public Object findInjectableValue(DeserializationContext context, Object beanInstance) throws JsonMappingException { if (_injectableValueId == null) { context.reportBadDefinition(ClassUtil.classOf(beanInstance), String.format("Property '%s' (type %s) has no injectable value id configured", getName(), getClass().getName())); } return context.findInjectableValue(_injectableValueId, this, beanInstance); }
args[i] = delegate; } else { // nope, injectable: args[i] = ctxt.findInjectableValue(prop.getInjectableValueId(), prop, null);
protected Object _findMissing(SettableBeanProperty prop) throws JsonMappingException { // First: do we have injectable value? Object injectableValueId = prop.getInjectableValueId(); if (injectableValueId != null) { return _context.findInjectableValue(prop.getInjectableValueId(), prop, null); } // Second: required? if (prop.isRequired()) { _context.reportInputMismatch(prop, "Missing required creator property '%s' (index %d)", prop.getName(), prop.getCreatorIndex()); } if (_context.isEnabled(DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES)) { _context.reportInputMismatch(prop, "Missing creator property '%s' (index %d); `DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES` enabled", prop.getName(), prop.getCreatorIndex()); } // Third: default value JsonDeserializer<Object> deser = prop.getValueDeserializer(); return deser.getNullValue(_context); }
public Object findValue(DeserializationContext context, Object beanInstance) throws JsonMappingException { return context.findInjectableValue(_valueId, this, beanInstance); }
public Object findValue(DeserializationContext context, Object beanInstance) { return context.findInjectableValue(_valueId, this, beanInstance); }
public Object findValue(DeserializationContext context, Object beanInstance) { return context.findInjectableValue(_valueId, this, beanInstance); }
public Object findValue(DeserializationContext context, Object beanInstance) { return context.findInjectableValue(_valueId, this, beanInstance); }
protected JPASERVICEIMPL getJPAService(final DeserializationContext deserializationContext, final Class<JPASERVICEIMPL> jpaServiceClass) throws IllegalStateException { Preconditions.checkNotNull(deserializationContext); final JPASERVICEIMPL jpaService = (JPASERVICEIMPL) deserializationContext.findInjectableValue(Key.get(jpaServiceClass), null, null); return Preconditions.checkNotNull(jpaService); }
/** * get a {@link org.dswarm.persistence.service.job.ComponentService} from Guice * * @param ctxt the deserialization context * @return the component service or throw an NPE if no service could be found */ private static ComponentService getComponentService(final DeserializationContext ctxt) { Preconditions.checkNotNull(ctxt); final ComponentService componentService = (ComponentService) ctxt.findInjectableValue(Key.get(ComponentService.class), null, null); return Preconditions.checkNotNull(componentService); }
public void inject(SettableBeanProperty[] injectableProperties) { for (int i = 0, len = injectableProperties.length; i < len; ++i) { SettableBeanProperty prop = injectableProperties[i]; if (prop != null) { // null since there is no POJO yet _creatorParameters[i] = _context.findInjectableValue(prop.getInjectableValueId(), prop, null); } } }
public void inject(SettableBeanProperty[] injectableProperties) { for (int i = 0, len = injectableProperties.length; i < len; ++i) { SettableBeanProperty prop = injectableProperties[i]; if (prop != null) { // null since there is no POJO yet _creatorParameters[i] = _context.findInjectableValue(prop.getInjectableValueId(), prop, null); } } }
/** * Method that can be called to locate value to be injected for this * property, if it is configured for this. */ public Object findInjectableValue(DeserializationContext context, Object beanInstance) { if (_injectableValueId == null) { throw new IllegalStateException("Property '"+getName() +"' (type "+getClass().getName()+") has no injectable value id configured"); } return context.findInjectableValue(_injectableValueId, this, beanInstance); }
/** * Method that can be called to locate value to be injected for this * property, if it is configured for this. */ public Object findInjectableValue(DeserializationContext context, Object beanInstance) { if (_injectableValueId == null) { throw new IllegalStateException("Property '"+getName() +"' (type "+getClass().getName()+") has no injectable value id configured"); } return context.findInjectableValue(_injectableValueId, this, beanInstance); }
/** * Method that can be called to locate value to be injected for this * property, if it is configured for this. */ public Object findInjectableValue(DeserializationContext context, Object beanInstance) { if (_injectableValueId == null) { throw new IllegalStateException("Property '"+getName() +"' (type "+getClass().getName()+") has no injectable value id configured"); } return context.findInjectableValue(_injectableValueId, this, beanInstance); }
public void inject(SettableBeanProperty[] injectableProperties) { for (int i = 0, len = injectableProperties.length; i < len; ++i) { SettableBeanProperty prop = injectableProperties[i]; if (prop != null) { // null since there is no POJO yet _creatorParameters[i] = _context.findInjectableValue(prop.getInjectableValueId(), prop, null); } } }
public void inject(SettableBeanProperty[] injectableProperties) { for (int i = 0, len = injectableProperties.length; i < len; ++i) { SettableBeanProperty prop = injectableProperties[i]; if (prop != null) { // null since there is no POJO yet _creatorParameters[i] = _context.findInjectableValue(prop.getInjectableValueId(), prop, null); } } }
/** * Method that can be called to locate value to be injected for this * property, if it is configured for this. */ public Object findInjectableValue(DeserializationContext context, Object beanInstance) { if (_injectableValueId == null) { throw new IllegalStateException("Property '"+getName() +"' (type "+getClass().getName()+") has no injectable value id configured"); } return context.findInjectableValue(_injectableValueId, this, beanInstance); }
/** * Method that can be called to locate value to be injected for this * property, if it is configured for this. */ public Object findInjectableValue(DeserializationContext context, Object beanInstance) { if (_injectableValueId == null) { throw new IllegalStateException("Property '"+getName() +"' (type "+getClass().getName()+") has no injectable value id configured"); } return context.findInjectableValue(_injectableValueId, this, beanInstance); }
@Override public Map<String, Object> deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { return deserializeVariablesObject(p.readValueAs(Object.class), (ObjectMapper) ctxt.findInjectableValue(ObjectMapper.class.getName(), null, null)); }