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


Java SerializationConfig.introspect方法代码示例

本文整理汇总了Java中com.fasterxml.jackson.databind.SerializationConfig.introspect方法的典型用法代码示例。如果您正苦于以下问题:Java SerializationConfig.introspect方法的具体用法?Java SerializationConfig.introspect怎么用?Java SerializationConfig.introspect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.fasterxml.jackson.databind.SerializationConfig的用法示例。


在下文中一共展示了SerializationConfig.introspect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBeanSerializer

import com.fasterxml.jackson.databind.SerializationConfig; //导入方法依赖的package包/类
public static JsonSerializer<Object> getBeanSerializer(SerializerProvider sp, Class<?> cls) throws JsonMappingException {

    final SerializationConfig config = sp.getConfig();
    final JavaType type = config.constructType(cls);
    final BeanDescription beanDesc = config.introspect(type);
    return BeanSerializerFactory.instance.findBeanSerializer(sp, type, beanDesc);
  }
 
开发者ID:atgse,项目名称:sam,代码行数:8,代码来源:JsonHelper.java

示例2: introspect

import com.fasterxml.jackson.databind.SerializationConfig; //导入方法依赖的package包/类
private static BeanDescription introspect(Class<?> type) {
  final JavaType javaType;
  SerializationConfig sc = Rosetta.getMapper().getSerializationConfig().withView(RosettaProperty.class);

  javaType = Rosetta.getMapper().getTypeFactory().constructType(type);
  return sc.introspect(javaType);
}
 
开发者ID:HubSpot,项目名称:httpQL,代码行数:8,代码来源:BeanPropertyIntrospector.java

示例3: createSerializer

import com.fasterxml.jackson.databind.SerializationConfig; //导入方法依赖的package包/类
public JsonSerializer<Object> createSerializer(SerializerProvider paramSerializerProvider, JavaType paramJavaType)
{
  SerializationConfig localSerializationConfig = paramSerializerProvider.getConfig();
  BeanDescription localBeanDescription = localSerializationConfig.introspect(paramJavaType);
  JsonSerializer localJsonSerializer = findSerializerFromAnnotation(paramSerializerProvider, localBeanDescription.getClassInfo());
  if (localJsonSerializer != null)
    return localJsonSerializer;
  JavaType localJavaType1 = modifyTypeByAnnotation(localSerializationConfig, localBeanDescription.getClassInfo(), paramJavaType);
  boolean bool;
  if (localJavaType1 == paramJavaType)
  {
    bool = false;
  }
  else
  {
    bool = true;
    if (!localJavaType1.hasRawClass(paramJavaType.getRawClass()))
      localBeanDescription = localSerializationConfig.introspect(localJavaType1);
  }
  Converter localConverter = localBeanDescription.findSerializationConverter();
  if (localConverter == null)
    return _createSerializer2(paramSerializerProvider, localJavaType1, localBeanDescription, bool);
  JavaType localJavaType2 = localConverter.getOutputType(paramSerializerProvider.getTypeFactory());
  if (!localJavaType2.hasRawClass(localJavaType1.getRawClass()))
    localBeanDescription = localSerializationConfig.introspect(localJavaType2);
  return new StdDelegatingSerializer(localConverter, localJavaType2, _createSerializer2(paramSerializerProvider, localJavaType2, localBeanDescription, true));
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:28,代码来源:BeanSerializerFactory.java


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