/** * Method called to create {@link BeanSerializer} instance with * all accumulated information. Will construct a serializer if we * have enough information, or return null if not. */ public JsonSerializer<?> build() { BeanPropertyWriter[] properties; // No properties or any getter? No real serializer; caller gets to handle if (_properties == null || _properties.isEmpty()) { if (_anyGetter == null) { return null; } properties = NO_PROPERTIES; } else { properties = _properties.toArray(new BeanPropertyWriter[_properties.size()]); } return new BeanSerializer(_beanDesc.getType(), properties, _filteredProperties, _anyGetter, _filterId); }
/** * Method to add a property setter. Will ensure that there is no * unexpected override; if one is found will throw a * {@link IllegalArgumentException}. */ public void addProperty(SettableBeanProperty prop) { SettableBeanProperty old = _properties.put(prop.getName(), prop); if (old != null && old != prop) { // should never occur... throw new IllegalArgumentException("Duplicate property '"+prop.getName()+"' for "+_beanDesc.getType()); } }
protected JavaType materializeAbstractType(DeserializationConfig config, BasicBeanDescription beanDesc) throws JsonMappingException { final JavaType abstractType = beanDesc.getType(); /* [JACKSON-502] (1.8): Now it is possible to have multiple resolvers too, * as they are registered via module interface. */ for (AbstractTypeResolver r : _factoryConfig.abstractTypeResolvers()) { JavaType concrete = r.resolveAbstractType(config, abstractType); if (concrete != null) { return concrete; } } return null; }
+name+"' (of type "+_beanDesc.getType()+"); serialization type "+serializationType+" has no content");
/** * @since 1.9.0 */ public ValueInstantiator constructValueInstantiator(DeserializationConfig config) { StdValueInstantiator inst = new StdValueInstantiator(config, _beanDesc.getType()); JavaType delegateType; if (_delegateCreator == null) { delegateType = null; } else { TypeBindings bindings = _beanDesc.bindingsForBeanType(); delegateType = bindings.resolveType(_delegateCreator.getParameterType(0)); } inst.configureFromObjectSettings(_defaultConstructor, _delegateCreator, delegateType, _propertyBasedCreator, _propertyBasedArgs); inst.configureFromStringCreator(_stringCreator); inst.configureFromIntCreator(_intCreator); inst.configureFromLongCreator(_longCreator); inst.configureFromDoubleCreator(_doubleCreator); inst.configureFromBooleanCreator(_booleanCreator); return inst; }
if (beanDesc.getType().isConcrete()) { AnnotatedConstructor defaultCtor = beanDesc.findDefaultConstructor(); if (defaultCtor != null) {
/** * Method called to create {@link BeanSerializer} instance with * all accumulated information. Will construct a serializer if we * have enough information, or return null if not. */ public JsonSerializer<?> build() { BeanPropertyWriter[] properties; // No properties or any getter? No real serializer; caller gets to handle if (_properties == null || _properties.isEmpty()) { if (_anyGetter == null) { return null; } properties = NO_PROPERTIES; } else { properties = _properties.toArray(new BeanPropertyWriter[_properties.size()]); } return new BeanSerializer(_beanDesc.getType(), properties, _filteredProperties, _anyGetter, _filterId); }
/** * Method to add a property setter. Will ensure that there is no * unexpected override; if one is found will throw a * {@link IllegalArgumentException}. */ public void addProperty(SettableBeanProperty prop) { SettableBeanProperty old = _properties.put(prop.getName(), prop); if (old != null && old != prop) { // should never occur... throw new IllegalArgumentException("Duplicate property '"+prop.getName()+"' for "+_beanDesc.getType()); } }
protected JavaType materializeAbstractType(DeserializationConfig config, BasicBeanDescription beanDesc) throws JsonMappingException { final JavaType abstractType = beanDesc.getType(); /* [JACKSON-502] (1.8): Now it is possible to have multiple resolvers too, * as they are registered via module interface. */ for (AbstractTypeResolver r : _factoryConfig.abstractTypeResolvers()) { JavaType concrete = r.resolveAbstractType(config, abstractType); if (concrete != null) { return concrete; } } return null; }
+name+"' (of type "+_beanDesc.getType()+"); serialization type "+serializationType+" has no content");
/** * @since 1.9.0 */ public ValueInstantiator constructValueInstantiator(DeserializationConfig config) { StdValueInstantiator inst = new StdValueInstantiator(config, _beanDesc.getType()); JavaType delegateType; if (_delegateCreator == null) { delegateType = null; } else { TypeBindings bindings = _beanDesc.bindingsForBeanType(); delegateType = bindings.resolveType(_delegateCreator.getParameterType(0)); } inst.configureFromObjectSettings(_defaultConstructor, _delegateCreator, delegateType, _propertyBasedCreator, _propertyBasedArgs); inst.configureFromStringCreator(_stringCreator); inst.configureFromIntCreator(_intCreator); inst.configureFromLongCreator(_longCreator); inst.configureFromDoubleCreator(_doubleCreator); inst.configureFromBooleanCreator(_booleanCreator); return inst; }
/** * Method called to create {@link BeanSerializer} instance with * all accumulated information. */ public JsonSerializer<?> build() { BeanPropertyWriter[] properties = (_properties == null || _properties.isEmpty()) ? NO_PROPERTIES : _properties.toArray(new BeanPropertyWriter[_properties.size()]); return new BeanSerializer(_beanDesc.getType(), properties, _filteredProperties, _anyGetter, _filterId); }
if (beanDesc.getType().isConcrete()) { AnnotatedConstructor defaultCtor = beanDesc.findDefaultConstructor(); if (defaultCtor != null) {
/** * Method called to create {@link BeanSerializer} instance with * all accumulated information. Will construct a serializer if we * have enough information, or return null if not. */ public JsonSerializer<?> build() { BeanPropertyWriter[] properties; // No properties or any getter? No real serializer; caller gets to handle if (_properties == null || _properties.isEmpty()) { if (_anyGetter == null) { return null; } properties = NO_PROPERTIES; } else { properties = _properties.toArray(new BeanPropertyWriter[_properties.size()]); } return new BeanSerializer(_beanDesc.getType(), properties, _filteredProperties, _anyGetter, _filterId); }
/** * Method to add a property setter. Will ensure that there is no * unexpected override; if one is found will throw a * {@link IllegalArgumentException}. */ public void addProperty(SettableBeanProperty prop) { SettableBeanProperty old = _properties.put(prop.getName(), prop); if (old != null && old != prop) { // should never occur... throw new IllegalArgumentException("Duplicate property '"+prop.getName()+"' for "+_beanDesc.getType()); } }
/** * Method to add a property setter. Will ensure that there is no * unexpected override; if one is found will throw a * {@link IllegalArgumentException}. */ public void addProperty(SettableBeanProperty prop) { SettableBeanProperty old = _properties.put(prop.getName(), prop); if (old != null && old != prop) { // should never occur... throw new IllegalArgumentException("Duplicate property '"+prop.getName()+"' for "+_beanDesc.getType()); } }
/** * Method to add a property setter. Will ensure that there is no * unexpected override; if one is found will throw a * {@link IllegalArgumentException}. */ public void addProperty(SettableBeanProperty prop) { SettableBeanProperty old = _properties.put(prop.getName(), prop); if (old != null && old != prop) { // should never occur... throw new IllegalArgumentException("Duplicate property '"+prop.getName()+"' for "+_beanDesc.getType()); } }
protected JavaType materializeAbstractType(DeserializationConfig config, BasicBeanDescription beanDesc) throws JsonMappingException { final JavaType abstractType = beanDesc.getType(); /* [JACKSON-502] (1.8): Now it is possible to have multiple resolvers too, * as they are registered via module interface. */ for (AbstractTypeResolver r : _factoryConfig.abstractTypeResolvers()) { JavaType concrete = r.resolveAbstractType(config, abstractType); if (concrete != null) { return concrete; } } return null; }
protected JavaType materializeAbstractType(DeserializationConfig config, BasicBeanDescription beanDesc) throws JsonMappingException { final JavaType abstractType = beanDesc.getType(); /* [JACKSON-502] (1.8): Now it is possible to have multiple resolvers too, * as they are registered via module interface. */ for (AbstractTypeResolver r : _factoryConfig.abstractTypeResolvers()) { JavaType concrete = r.resolveAbstractType(config, abstractType); if (concrete != null) { return concrete; } } return null; }
public JsonDeserializer<?> build(BeanProperty forProperty) { BeanPropertyMap propertyMap = new BeanPropertyMap(_properties.values()); propertyMap.assignIndexes(); return new BeanDeserializer(_beanDesc.getClassInfo(), _beanDesc.getType(), forProperty, _creators, propertyMap, _backRefProperties, _ignorableProps, _ignoreAllUnknown, _anySetter); } }