本文整理汇总了Java中com.fasterxml.jackson.databind.ser.BeanPropertyWriter.assignNullSerializer方法的典型用法代码示例。如果您正苦于以下问题:Java BeanPropertyWriter.assignNullSerializer方法的具体用法?Java BeanPropertyWriter.assignNullSerializer怎么用?Java BeanPropertyWriter.assignNullSerializer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.fasterxml.jackson.databind.ser.BeanPropertyWriter
的用法示例。
在下文中一共展示了BeanPropertyWriter.assignNullSerializer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolve
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter; //导入方法依赖的package包/类
public void resolve(SerializerProvider paramSerializerProvider)
{
int i;
if (this._filteredProps == null)
i = 0;
else
i = this._filteredProps.length;
int j = 0;
int k = this._props.length;
while (j < k)
{
BeanPropertyWriter localBeanPropertyWriter1 = this._props[j];
if ((!localBeanPropertyWriter1.willSuppressNulls()) && (!localBeanPropertyWriter1.hasNullSerializer()))
{
JsonSerializer localJsonSerializer2 = paramSerializerProvider.findNullValueSerializer(localBeanPropertyWriter1);
if (localJsonSerializer2 != null)
{
localBeanPropertyWriter1.assignNullSerializer(localJsonSerializer2);
if (j < i)
{
BeanPropertyWriter localBeanPropertyWriter3 = this._filteredProps[j];
if (localBeanPropertyWriter3 != null)
localBeanPropertyWriter3.assignNullSerializer(localJsonSerializer2);
}
}
}
if (!localBeanPropertyWriter1.hasSerializer())
{
JsonSerializer localJsonSerializer1 = findConvertingSerializer(paramSerializerProvider, localBeanPropertyWriter1);
Object localObject1 = localJsonSerializer1;
if (localJsonSerializer1 == null)
{
JavaType localJavaType1 = localBeanPropertyWriter1.getSerializationType();
Object localObject2 = localJavaType1;
if (localJavaType1 == null)
{
JavaType localJavaType2 = paramSerializerProvider.constructType(localBeanPropertyWriter1.getGenericPropertyType());
localObject2 = localJavaType2;
if (!localJavaType2.isFinal())
{
if ((!((JavaType)localObject2).isContainerType()) && (((JavaType)localObject2).containedTypeCount() <= 0))
break label281;
localBeanPropertyWriter1.setNonTrivialBaseType((JavaType)localObject2);
break label281;
}
}
localObject1 = paramSerializerProvider.findValueSerializer((JavaType)localObject2, localBeanPropertyWriter1);
if (((JavaType)localObject2).isContainerType())
{
TypeSerializer localTypeSerializer = (TypeSerializer)((JavaType)localObject2).getContentType().getTypeHandler();
if ((localTypeSerializer != null) && ((localObject1 instanceof ContainerSerializer)))
localObject1 = ((ContainerSerializer)localObject1).withValueTypeSerializer(localTypeSerializer);
}
}
localBeanPropertyWriter1.assignSerializer((JsonSerializer)localObject1);
if (j < i)
{
BeanPropertyWriter localBeanPropertyWriter2 = this._filteredProps[j];
if (localBeanPropertyWriter2 != null)
localBeanPropertyWriter2.assignSerializer((JsonSerializer)localObject1);
}
}
label281: j++;
}
if (this._anyGetterWriter != null)
this._anyGetterWriter.resolve(paramSerializerProvider);
}