当前位置: 首页>>代码示例>>Java>>正文


Java BeanPropertyWriter.assignNullSerializer方法代码示例

本文整理汇总了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);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:68,代码来源:BeanSerializerBase.java


注:本文中的com.fasterxml.jackson.databind.ser.BeanPropertyWriter.assignNullSerializer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。