@Override public String toString() { return "[creator property, name '"+getName()+"'; inject id '"+_injectableValueId+"']"; }
/** * 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); }
private void _reportMissingSetter(JsonParser p, DeserializationContext ctxt) throws IOException { final String msg = "No fallback setter/field defined for creator property '"+getName()+"'"; // Hmmmh. Should we return quietly (NOP), or error? // Perhaps better to throw an exception, since it's generally an error. if (ctxt != null ) { ctxt.reportBadDefinition(getType(), msg); } else { throw InvalidDefinitionException.from(p, msg, getType()); } } }
@Override public String toString() { return "[creator property, name '"+getName()+"'; inject id '"+_injectableValueId+"']"; } }
@Override public String toString() { return "[creator property, name '"+getName()+"'; inject id '"+_injectableValueId+"']"; } }
@Override public String toString() { return "[creator property, name '"+getName()+"'; inject id '"+_injectableValueId+"']"; } }
@Override public String toString() { return "[creator property, name '"+getName()+"'; inject id '"+_injectableValueId+"']"; }
@Override public String toString() { return "[creator property, name '"+getName()+"'; inject id '"+_injectableValueId+"']"; } }
@Override public String toString() { return "[creator property, name '"+getName()+"'; inject id '"+_injectableValueId+"']"; } }
/** * 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); }
/** * 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 addPropertyCreator(AnnotatedWithParams creator, CreatorProperty[] properties) { _propertyBasedCreator = verifyNonDup(creator, _propertyBasedCreator, "property-based"); // [JACKSON-470] Better ensure we have no duplicate names either... if (properties.length > 1) { HashMap<String,Integer> names = new HashMap<String,Integer>(); for (int i = 0, len = properties.length; i < len; ++i) { String name = properties[i].getName(); /* [Issue-13]: Need to consider Injectables, which may not have * a name at all, and need to be skipped */ if (name.length() == 0 && properties[i].getInjectableValueId() != null) { continue; } Integer old = names.put(name, Integer.valueOf(i)); if (old != null) { throw new IllegalArgumentException("Duplicate creator property \""+name+"\" (index "+old+" vs "+i+")"); } } } _propertyBasedArgs = properties; }
public void addPropertyCreator(AnnotatedWithParams creator, CreatorProperty[] properties) { _propertyBasedCreator = verifyNonDup(creator, _propertyBasedCreator, "property-based"); // [JACKSON-470] Better ensure we have no duplicate names either... if (properties.length > 1) { HashMap<String,Integer> names = new HashMap<String,Integer>(); for (int i = 0, len = properties.length; i < len; ++i) { String name = properties[i].getName(); /* [Issue-13]: Need to consider Injectables, which may not have * a name at all, and need to be skipped */ if (name.length() == 0 && properties[i].getInjectableValueId() != null) { continue; } Integer old = names.put(name, Integer.valueOf(i)); if (old != null) { throw new IllegalArgumentException("Duplicate creator property \""+name+"\" (index "+old+" vs "+i+")"); } } } _propertyBasedArgs = properties; }
public void addPropertyCreator(AnnotatedWithParams creator, boolean explicit, CreatorProperty[] properties) { verifyNonDup(creator, C_PROPS, explicit); // [JACKSON-470] Better ensure we have no duplicate names either... if (properties.length > 1) { HashMap<String,Integer> names = new HashMap<String,Integer>(); for (int i = 0, len = properties.length; i < len; ++i) { String name = properties[i].getName(); /* [Issue-13]: Need to consider Injectables, which may not have * a name at all, and need to be skipped */ if (name.length() == 0 && properties[i].getInjectableValueId() != null) { continue; } Integer old = names.put(name, Integer.valueOf(i)); if (old != null) { throw new IllegalArgumentException("Duplicate creator property \""+name+"\" (index "+old+" vs "+i+")"); } } } _propertyBasedArgs = properties; }
public void addPropertyCreator(AnnotatedWithParams creator, boolean explicit, CreatorProperty[] properties) { verifyNonDup(creator, C_PROPS, explicit); // [JACKSON-470] Better ensure we have no duplicate names either... if (properties.length > 1) { HashMap<String,Integer> names = new HashMap<String,Integer>(); for (int i = 0, len = properties.length; i < len; ++i) { String name = properties[i].getName(); /* [Issue-13]: Need to consider Injectables, which may not have * a name at all, and need to be skipped */ if (name.length() == 0 && properties[i].getInjectableValueId() != null) { continue; } Integer old = names.put(name, Integer.valueOf(i)); if (old != null) { throw new IllegalArgumentException("Duplicate creator property \""+name+"\" (index "+old+" vs "+i+")"); } } } _propertyBasedArgs = properties; }
/** * 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); }
private void _reportMissingSetter(JsonParser p, DeserializationContext ctxt) throws IOException { final String msg = "No fallback setter/field defined for creator property '"+getName()+"'"; // Hmmmh. Should we return quietly (NOP), or error? // Perhaps better to throw an exception, since it's generally an error. if (ctxt != null ) { ctxt.reportBadDefinition(getType(), msg); } else { throw InvalidDefinitionException.from(p, msg, getType()); } } }