builder.addOrReplaceProperty(prop, true);
if (PropertyName.equals(settableBeanProperty.getName())) { SettableBeanProperty newSettableBeanProperty = settableBeanProperty.withValueDeserializer(new CustomDeserializer()); builder.addOrReplaceProperty(newSettableBeanProperty, true); break;
@Override public BeanDeserializerBuilder updateBuilder(DeserializationConfig config, BeanDescription beanDesc, BeanDeserializerBuilder builder) { Iterator<SettableBeanProperty> properties = builder.getProperties(); entities.getPersistentEntity(beanDesc.getBeanClass()).ifPresent(entity -> { while (properties.hasNext()) { SettableBeanProperty property = properties.next(); PersistentProperty<?> persistentProperty = entity.getPersistentProperty(property.getName()); if (persistentProperty == null) { continue; } if (associationLinks.isLookupType(persistentProperty)) { RepositoryInvokingDeserializer repositoryInvokingDeserializer = new RepositoryInvokingDeserializer(factory, persistentProperty); JsonDeserializer<?> deserializer = wrapIfCollection(persistentProperty, repositoryInvokingDeserializer, config); builder.addOrReplaceProperty(property.withValueDeserializer(deserializer), false); continue; } if (!associationLinks.isLinkableAssociation(persistentProperty)) { continue; } UriStringDeserializer uriStringDeserializer = new UriStringDeserializer(persistentProperty, converter); JsonDeserializer<?> deserializer = wrapIfCollection(persistentProperty, uriStringDeserializer, config); builder.addOrReplaceProperty(property.withValueDeserializer(deserializer), false); } }); return builder; }
@Override public BeanDeserializerBuilder updateBuilder( DeserializationConfig config, BeanDescription beanDesc, BeanDeserializerBuilder builder) { Iterator<SettableBeanProperty> propertiesIterator = builder.getProperties(); while (propertiesIterator.hasNext()) { SettableBeanProperty property = propertiesIterator.next(); SettableBeanProperty wrappedProperty = new ErrorReportingSettableBeanProperty( property, jsonErrorConsumer); builder.addOrReplaceProperty(wrappedProperty, true); } return builder; } };
@Override public BeanDeserializerBuilder updateBuilder(DeserializationConfig config, BeanDescription beanDesc, BeanDeserializerBuilder builder) { Iterator<SettableBeanProperty> beanPropertyIterator = builder.getProperties(); while (beanPropertyIterator.hasNext()) { SettableBeanProperty settableBeanProperty = beanPropertyIterator.next(); Encrypted encrypted = settableBeanProperty.getAnnotation(Encrypted.class); if (encrypted == null) continue; String source = encrypted.source(); EncryptionService service = sourceMap.get(source); if (service == null) { throw new IllegalArgumentException(String.format( "No encryption key source defined for %s.", source)); } JsonDeserializer<Object> current = settableBeanProperty.getValueDeserializer(); builder.addOrReplaceProperty(settableBeanProperty .withValueDeserializer(new EncryptedJsonDeserializer(service, encrypted, current)), true); } return builder; }
@Override public BeanDeserializerBuilder updateBuilder(DeserializationConfig config, BeanDescription beanDesc, BeanDeserializerBuilder builder) { for (BeanPropertyDefinition propDef : beanDesc.findProperties()) { if (!propDef.hasGetter() || propDef.hasSetter()) { continue; } AnnotatedMember getter = propDef.getAccessor(); if (!Keeper.class.equals(getter.getRawType())) { continue; } builder.addOrReplaceProperty(new CustomGetterBeanProperty(propDef, getter), true); } return builder; }
@Override public BeanDeserializerBuilder updateBuilder(DeserializationConfig config, BeanDescription beanDesc, BeanDeserializerBuilder builder) { Iterator<SettableBeanProperty> properties = builder.getProperties(); entities.getPersistentEntity(beanDesc.getBeanClass()).ifPresent(entity -> { while (properties.hasNext()) { SettableBeanProperty property = properties.next(); PersistentProperty<?> persistentProperty = entity.getPersistentProperty(property.getName()); if (persistentProperty == null) { continue; } if (associationLinks.isLookupType(persistentProperty)) { RepositoryInvokingDeserializer repositoryInvokingDeserializer = new RepositoryInvokingDeserializer(factory, persistentProperty); JsonDeserializer<?> deserializer = wrapIfCollection(persistentProperty, repositoryInvokingDeserializer, config); builder.addOrReplaceProperty(property.withValueDeserializer(deserializer), false); continue; } if (!associationLinks.isLinkableAssociation(persistentProperty)) { continue; } UriStringDeserializer uriStringDeserializer = new UriStringDeserializer(persistentProperty, converter); JsonDeserializer<?> deserializer = wrapIfCollection(persistentProperty, uriStringDeserializer, config); builder.addOrReplaceProperty(property.withValueDeserializer(deserializer), false); } }); return builder; }
BeanPropertyMutator baseMutator = collector.buildMutator(_classLoader); for (OptimizedSettableBeanProperty<?> prop : newProps) { builder.addOrReplaceProperty(prop.withMutator(baseMutator), true);
BeanPropertyMutator mut = baseMutator.with(prop.getOriginalProperty(), prop.getOptimizedIndex()); builder.addOrReplaceProperty(prop.withMutator(mut), true);
builder.addOrReplaceProperty(prop, true);
builder.addOrReplaceProperty(prop, true);
builder.addOrReplaceProperty(prop, true);
builder.addOrReplaceProperty(prop, true);
builder.addOrReplaceProperty(prop, true);
builder.addOrReplaceProperty(prop, true);