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


Java SerializationConfig.getAnnotationIntrospector方法代码示例

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


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

示例1: removeIgnorableTypes

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
protected <T extends AnnotatedMember> void removeIgnorableTypes(SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription, Map<String, T> paramMap)
{
  if (paramMap.isEmpty());
  while (true)
  {
    return;
    AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
    Iterator localIterator = paramMap.entrySet().iterator();
    HashMap localHashMap = new HashMap();
    while (localIterator.hasNext())
    {
      Class localClass = ((AnnotatedMember)((Map.Entry)localIterator.next()).getValue()).getRawType();
      Boolean localBoolean = (Boolean)localHashMap.get(localClass);
      if (localBoolean == null)
      {
        localBoolean = localAnnotationIntrospector.isIgnorableType(((BasicBeanDescription)paramSerializationConfig.introspectClassAnnotations(localClass)).getClassInfo());
        if (localBoolean == null)
          localBoolean = Boolean.FALSE;
        localHashMap.put(localClass, localBoolean);
      }
      if (!localBoolean.booleanValue())
        continue;
      localIterator.remove();
    }
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:27,代码来源:BeanSerializerFactory.java

示例2: findPropertyContentTypeSerializer

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
public TypeSerializer findPropertyContentTypeSerializer(JavaType paramJavaType, SerializationConfig paramSerializationConfig, AnnotatedMember paramAnnotatedMember, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  JavaType localJavaType = paramJavaType.getContentType();
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  TypeResolverBuilder localTypeResolverBuilder = localAnnotationIntrospector.findPropertyContentTypeResolver(paramSerializationConfig, paramAnnotatedMember, paramJavaType);
  if (localTypeResolverBuilder == null)
    return createTypeSerializer(paramSerializationConfig, localJavaType, paramBeanProperty);
  return localTypeResolverBuilder.buildTypeSerializer(paramSerializationConfig, localJavaType, paramSerializationConfig.getSubtypeResolver().collectAndResolveSubtypes(paramAnnotatedMember, paramSerializationConfig, localAnnotationIntrospector), paramBeanProperty);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:11,代码来源:BeanSerializerFactory.java

示例3: findPropertyTypeSerializer

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
public TypeSerializer findPropertyTypeSerializer(JavaType paramJavaType, SerializationConfig paramSerializationConfig, AnnotatedMember paramAnnotatedMember, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  TypeResolverBuilder localTypeResolverBuilder = localAnnotationIntrospector.findPropertyTypeResolver(paramSerializationConfig, paramAnnotatedMember, paramJavaType);
  if (localTypeResolverBuilder == null)
    return createTypeSerializer(paramSerializationConfig, paramJavaType, paramBeanProperty);
  return localTypeResolverBuilder.buildTypeSerializer(paramSerializationConfig, paramJavaType, paramSerializationConfig.getSubtypeResolver().collectAndResolveSubtypes(paramAnnotatedMember, paramSerializationConfig, localAnnotationIntrospector), paramBeanProperty);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:10,代码来源:BeanSerializerFactory.java

示例4: sortBeanProperties

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
protected List<BeanPropertyWriter> sortBeanProperties(SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription, List<BeanPropertyWriter> paramList)
{
  List localList = paramBasicBeanDescription.findCreatorPropertyNames();
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  AnnotatedClass localAnnotatedClass = paramBasicBeanDescription.getClassInfo();
  String[] arrayOfString = localAnnotationIntrospector.findSerializationPropertyOrder(localAnnotatedClass);
  Boolean localBoolean = localAnnotationIntrospector.findSerializationSortAlphabetically(localAnnotatedClass);
  if (localBoolean == null);
  for (boolean bool = paramSerializationConfig.isEnabled(SerializationConfig.Feature.SORT_PROPERTIES_ALPHABETICALLY); ; bool = localBoolean.booleanValue())
  {
    if ((bool) || (!localList.isEmpty()) || (arrayOfString != null))
      paramList = _sortBeanProperties(paramList, localList, arrayOfString, bool);
    return paramList;
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:16,代码来源:BeanSerializerFactory.java

示例5: construct

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
public static EnumSerializer construct(Class<Enum<?>> paramClass, SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription)
{
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  if (paramSerializationConfig.isEnabled(SerializationConfig.Feature.WRITE_ENUMS_USING_TO_STRING));
  for (EnumValues localEnumValues = EnumValues.constructFromToString(paramClass, localAnnotationIntrospector); ; localEnumValues = EnumValues.constructFromName(paramClass, localAnnotationIntrospector))
    return new EnumSerializer(localEnumValues);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:EnumSerializer.java

示例6: findContentSerializer

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
protected static JsonSerializer<Object> findContentSerializer(SerializationConfig paramSerializationConfig, Annotated paramAnnotated, BeanProperty paramBeanProperty)
{
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  Class localClass = localAnnotationIntrospector.findContentSerializer(paramAnnotated);
  if (((localClass == null) || (localClass == JsonSerializer.None.class)) && (paramBeanProperty != null))
    localClass = localAnnotationIntrospector.findContentSerializer(paramBeanProperty.getMember());
  if ((localClass != null) && (localClass != JsonSerializer.None.class))
    return paramSerializationConfig.serializerInstance(paramAnnotated, localClass);
  return null;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:11,代码来源:BasicSerializerFactory.java

示例7: findKeySerializer

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
protected static JsonSerializer<Object> findKeySerializer(SerializationConfig paramSerializationConfig, Annotated paramAnnotated, BeanProperty paramBeanProperty)
{
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  Class localClass = localAnnotationIntrospector.findKeySerializer(paramAnnotated);
  if (((localClass == null) || (localClass == JsonSerializer.None.class)) && (paramBeanProperty != null))
    localClass = localAnnotationIntrospector.findKeySerializer(paramBeanProperty.getMember());
  if ((localClass != null) && (localClass != JsonSerializer.None.class))
    return paramSerializationConfig.serializerInstance(paramAnnotated, localClass);
  return null;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:11,代码来源:BasicSerializerFactory.java

示例8: createTypeSerializer

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
public TypeSerializer createTypeSerializer(SerializationConfig paramSerializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty)
{
  AnnotatedClass localAnnotatedClass = ((BasicBeanDescription)paramSerializationConfig.introspectClassAnnotations(paramJavaType.getRawClass())).getClassInfo();
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  TypeResolverBuilder localTypeResolverBuilder = localAnnotationIntrospector.findTypeResolver(paramSerializationConfig, localAnnotatedClass, paramJavaType);
  Collection localCollection = null;
  if (localTypeResolverBuilder == null)
    localTypeResolverBuilder = paramSerializationConfig.getDefaultTyper(paramJavaType);
  while (localTypeResolverBuilder == null)
  {
    return null;
    localCollection = paramSerializationConfig.getSubtypeResolver().collectAndResolveSubtypes(localAnnotatedClass, paramSerializationConfig, localAnnotationIntrospector);
  }
  return localTypeResolverBuilder.buildTypeSerializer(paramSerializationConfig, paramJavaType, localCollection, paramBeanProperty);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:16,代码来源:BasicSerializerFactory.java

示例9: usesStaticTyping

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
protected boolean usesStaticTyping(SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription, TypeSerializer paramTypeSerializer, BeanProperty paramBeanProperty)
{
  if (paramTypeSerializer != null);
  AnnotationIntrospector localAnnotationIntrospector;
  JavaType localJavaType;
  do
  {
    do
    {
      do
      {
        return false;
        localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
        JsonSerialize.Typing localTyping = localAnnotationIntrospector.findSerializationTyping(paramBasicBeanDescription.getClassInfo());
        if (localTyping != null)
        {
          if (localTyping == JsonSerialize.Typing.STATIC)
            return true;
        }
        else if (paramSerializationConfig.isEnabled(SerializationConfig.Feature.USE_STATIC_TYPING))
          return true;
      }
      while (paramBeanProperty == null);
      localJavaType = paramBeanProperty.getType();
    }
    while (!localJavaType.isContainerType());
    if (localAnnotationIntrospector.findSerializationContentType(paramBeanProperty.getMember(), paramBeanProperty.getType()) != null)
      return true;
  }
  while ((!(localJavaType instanceof MapType)) || (localAnnotationIntrospector.findSerializationKeyType(paramBeanProperty.getMember(), paramBeanProperty.getType()) == null));
  return true;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:33,代码来源:BasicSerializerFactory.java

示例10: forSerialization

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
public BasicBeanDescription forSerialization(SerializationConfig paramSerializationConfig, JavaType paramJavaType, ClassIntrospector.MixInResolver paramMixInResolver)
{
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  AnnotatedClass localAnnotatedClass = AnnotatedClass.construct(paramJavaType.getRawClass(), localAnnotationIntrospector, paramMixInResolver);
  localAnnotatedClass.resolveMemberMethods(getSerializationMethodFilter(paramSerializationConfig), false);
  localAnnotatedClass.resolveCreators(true);
  localAnnotatedClass.resolveFields(false);
  return new BasicBeanDescription(paramSerializationConfig, paramJavaType, localAnnotatedClass);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:10,代码来源:BasicClassIntrospector.java

示例11: findBeanProperties

import org.codehaus.jackson.map.SerializationConfig; //导入方法依赖的package包/类
protected List<BeanPropertyWriter> findBeanProperties(SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription)
  throws JsonMappingException
{
  VisibilityChecker localVisibilityChecker1 = paramSerializationConfig.getDefaultVisibilityChecker();
  if (!paramSerializationConfig.isEnabled(SerializationConfig.Feature.AUTO_DETECT_GETTERS))
  {
    JsonAutoDetect.Visibility localVisibility3 = JsonAutoDetect.Visibility.NONE;
    localVisibilityChecker1 = localVisibilityChecker1.withGetterVisibility(localVisibility3);
  }
  if (!paramSerializationConfig.isEnabled(SerializationConfig.Feature.AUTO_DETECT_IS_GETTERS))
  {
    JsonAutoDetect.Visibility localVisibility2 = JsonAutoDetect.Visibility.NONE;
    localVisibilityChecker1 = localVisibilityChecker1.withIsGetterVisibility(localVisibility2);
  }
  if (!paramSerializationConfig.isEnabled(SerializationConfig.Feature.AUTO_DETECT_FIELDS))
  {
    JsonAutoDetect.Visibility localVisibility1 = JsonAutoDetect.Visibility.NONE;
    localVisibilityChecker1 = localVisibilityChecker1.withFieldVisibility(localVisibility1);
  }
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  VisibilityChecker localVisibilityChecker2 = localAnnotationIntrospector.findAutoDetectVisibility(paramBasicBeanDescription.getClassInfo(), localVisibilityChecker1);
  LinkedHashMap localLinkedHashMap1 = paramBasicBeanDescription.findGetters(localVisibilityChecker2, null);
  LinkedHashMap localLinkedHashMap2 = paramBasicBeanDescription.findSerializableFields(localVisibilityChecker2, localLinkedHashMap1.keySet());
  removeIgnorableTypes(paramSerializationConfig, paramBasicBeanDescription, localLinkedHashMap1);
  removeIgnorableTypes(paramSerializationConfig, paramBasicBeanDescription, localLinkedHashMap2);
  ArrayList localArrayList;
  if ((localLinkedHashMap1.isEmpty()) && (localLinkedHashMap2.isEmpty()))
    localArrayList = null;
  while (true)
  {
    return localArrayList;
    boolean bool = usesStaticTyping(paramSerializationConfig, paramBasicBeanDescription, null, null);
    PropertyBuilder localPropertyBuilder = constructPropertyBuilder(paramSerializationConfig, paramBasicBeanDescription);
    int i = localLinkedHashMap1.size();
    localArrayList = new ArrayList(i);
    TypeBindings localTypeBindings = paramBasicBeanDescription.bindingsForBeanType();
    Iterator localIterator1 = localLinkedHashMap2.entrySet().iterator();
    while (localIterator1.hasNext())
    {
      Map.Entry localEntry2 = (Map.Entry)localIterator1.next();
      AnnotationIntrospector.ReferenceProperty localReferenceProperty2 = localAnnotationIntrospector.findReferenceType((AnnotatedMember)localEntry2.getValue());
      if ((localReferenceProperty2 != null) && (localReferenceProperty2.isBackReference()))
        continue;
      BeanPropertyWriter localBeanPropertyWriter2 = _constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, (String)localEntry2.getKey(), (AnnotatedMember)localEntry2.getValue());
      localArrayList.add(localBeanPropertyWriter2);
    }
    Iterator localIterator2 = localLinkedHashMap1.entrySet().iterator();
    while (localIterator2.hasNext())
    {
      Map.Entry localEntry1 = (Map.Entry)localIterator2.next();
      AnnotationIntrospector.ReferenceProperty localReferenceProperty1 = localAnnotationIntrospector.findReferenceType((AnnotatedMember)localEntry1.getValue());
      if ((localReferenceProperty1 != null) && (localReferenceProperty1.isBackReference()))
        continue;
      BeanPropertyWriter localBeanPropertyWriter1 = _constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, (String)localEntry1.getKey(), (AnnotatedMember)localEntry1.getValue());
      localArrayList.add(localBeanPropertyWriter1);
    }
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:59,代码来源:BeanSerializerFactory.java


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