• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MapperConfig类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



MapperConfig类属于org.codehaus.jackson.map包,在下文中一共展示了MapperConfig类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: collectAndResolveSubtypes

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
public Collection<NamedType> collectAndResolveSubtypes(AnnotatedClass paramAnnotatedClass, MapperConfig<?> paramMapperConfig, AnnotationIntrospector paramAnnotationIntrospector)
{
  HashMap localHashMap = new HashMap();
  if (this._registeredSubtypes != null)
  {
    Class localClass = paramAnnotatedClass.getRawType();
    Iterator localIterator = this._registeredSubtypes.iterator();
    while (localIterator.hasNext())
    {
      NamedType localNamedType = (NamedType)localIterator.next();
      if (!localClass.isAssignableFrom(localNamedType.getType()))
        continue;
      _collectAndResolve(AnnotatedClass.constructWithoutSuperTypes(localNamedType.getType(), paramAnnotationIntrospector, paramMapperConfig), localNamedType, paramMapperConfig, paramAnnotationIntrospector, localHashMap);
    }
  }
  _collectAndResolve(paramAnnotatedClass, new NamedType(paramAnnotatedClass.getRawType(), null), paramMapperConfig, paramAnnotationIntrospector, localHashMap);
  return new ArrayList(localHashMap.values());
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:19,代码来源:StdSubtypeResolver.java


示例2: idResolver

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
protected TypeIdResolver idResolver(MapperConfig<?> paramMapperConfig, JavaType paramJavaType, Collection<NamedType> paramCollection, boolean paramBoolean1, boolean paramBoolean2)
{
  if (this._customIdResolver != null)
    return this._customIdResolver;
  if (this._idType == null)
    throw new IllegalStateException("Can not build, 'init()' not yet called");
  switch (1.$SwitchMap$org$codehaus$jackson$annotate$JsonTypeInfo$Id[this._idType.ordinal()])
  {
  default:
    throw new IllegalStateException("Do not know how to construct standard type id resolver for idType: " + this._idType);
  case 1:
    return new ClassNameIdResolver(paramJavaType, paramMapperConfig.getTypeFactory());
  case 2:
    return new MinimalClassNameIdResolver(paramJavaType, paramMapperConfig.getTypeFactory());
  case 3:
  }
  return TypeNameIdResolver.construct(paramMapperConfig, paramJavaType, paramCollection, paramBoolean1, paramBoolean2);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:19,代码来源:StdTypeResolverBuilder.java


示例3: collectAndResolveSubtypes

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
public Collection<NamedType> collectAndResolveSubtypes(AnnotatedClass paramAnnotatedClass, MapperConfig<?> paramMapperConfig, AnnotationIntrospector paramAnnotationIntrospector)
{
  HashMap localHashMap = new HashMap();
  if (this._registeredSubtypes != null)
  {
    Class localClass = paramAnnotatedClass.getRawType();
    Iterator localIterator = this._registeredSubtypes.iterator();
    while (localIterator.hasNext())
    {
      NamedType localNamedType = (NamedType)localIterator.next();
      if (localClass.isAssignableFrom(localNamedType.getType()))
        _collectAndResolve(AnnotatedClass.constructWithoutSuperTypes(localNamedType.getType(), paramAnnotationIntrospector, paramMapperConfig), localNamedType, paramMapperConfig, paramAnnotationIntrospector, localHashMap);
    }
  }
  _collectAndResolve(paramAnnotatedClass, new NamedType(paramAnnotatedClass.getRawType(), null), paramMapperConfig, paramAnnotationIntrospector, localHashMap);
  return new ArrayList(localHashMap.values());
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:18,代码来源:StdSubtypeResolver.java


示例4: idResolver

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
protected TypeIdResolver idResolver(MapperConfig<?> paramMapperConfig, JavaType paramJavaType, Collection<NamedType> paramCollection, boolean paramBoolean1, boolean paramBoolean2)
{
  if (this._customIdResolver != null)
    return this._customIdResolver;
  if (this._idType == null)
    throw new IllegalStateException("Can not build, 'init()' not yet called");
  switch (StdTypeResolverBuilder.1.$SwitchMap$org$codehaus$jackson$annotate$JsonTypeInfo$Id[this._idType.ordinal()])
  {
  default:
    throw new IllegalStateException("Do not know how to construct standard type id resolver for idType: " + this._idType);
  case 1:
    return new ClassNameIdResolver(paramJavaType, paramMapperConfig.getTypeFactory());
  case 2:
    return new MinimalClassNameIdResolver(paramJavaType, paramMapperConfig.getTypeFactory());
  case 3:
  }
  return TypeNameIdResolver.construct(paramMapperConfig, paramJavaType, paramCollection, paramBoolean1, paramBoolean2);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:19,代码来源:StdTypeResolverBuilder.java


示例5: POJOPropertiesCollector

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
protected POJOPropertiesCollector(MapperConfig<?> paramMapperConfig, boolean paramBoolean, JavaType paramJavaType, AnnotatedClass paramAnnotatedClass)
{
  this._config = paramMapperConfig;
  this._forSerialization = paramBoolean;
  this._type = paramJavaType;
  this._classDef = paramAnnotatedClass;
  boolean bool = paramMapperConfig.isAnnotationProcessingEnabled();
  AnnotationIntrospector localAnnotationIntrospector = null;
  if (bool)
    localAnnotationIntrospector = this._config.getAnnotationIntrospector();
  this._annotationIntrospector = localAnnotationIntrospector;
  if (this._annotationIntrospector == null)
  {
    this._visibilityChecker = this._config.getDefaultVisibilityChecker();
    return;
  }
  this._visibilityChecker = this._annotationIntrospector.findAutoDetectVisibility(paramAnnotatedClass, this._config.getDefaultVisibilityChecker());
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:19,代码来源:POJOPropertiesCollector.java


示例6: TypeNameIdResolver

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
protected TypeNameIdResolver(MapperConfig<?> paramMapperConfig, JavaType paramJavaType, HashMap<String, String> paramHashMap, HashMap<String, JavaType> paramHashMap1)
{
  super(paramJavaType, paramMapperConfig.getTypeFactory());
  this._config = paramMapperConfig;
  this._typeToId = paramHashMap;
  this._idToType = paramHashMap1;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:TypeNameIdResolver.java


示例7: construct

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
public static TypeNameIdResolver construct(MapperConfig<?> paramMapperConfig, JavaType paramJavaType, Collection<NamedType> paramCollection, boolean paramBoolean1, boolean paramBoolean2)
{
  if (paramBoolean1 == paramBoolean2)
    throw new IllegalArgumentException();
  HashMap localHashMap1 = null;
  if (paramBoolean1)
    localHashMap1 = new HashMap();
  HashMap localHashMap2 = null;
  if (paramBoolean2)
    localHashMap2 = new HashMap();
  if (paramCollection != null)
  {
    Iterator localIterator = paramCollection.iterator();
    if (localIterator.hasNext())
    {
      NamedType localNamedType = (NamedType)localIterator.next();
      Class localClass = localNamedType.getType();
      if (localNamedType.hasName());
      for (String str = localNamedType.getName(); ; str = _defaultTypeId(localClass))
      {
        if (paramBoolean1)
          localHashMap1.put(localClass.getName(), str);
        if (!paramBoolean2)
          break;
        JavaType localJavaType = (JavaType)localHashMap2.get(str);
        if ((localJavaType != null) && (localClass.isAssignableFrom(localJavaType.getRawClass())))
          break;
        localHashMap2.put(str, paramMapperConfig.constructType(localClass));
        break;
      }
    }
  }
  return new TypeNameIdResolver(paramMapperConfig, paramJavaType, localHashMap1, localHashMap2);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:35,代码来源:TypeNameIdResolver.java


示例8: BasicBeanDescription

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
public BasicBeanDescription(MapperConfig<?> paramMapperConfig, JavaType paramJavaType, AnnotatedClass paramAnnotatedClass)
{
  super(paramJavaType);
  this._config = paramMapperConfig;
  this._annotationIntrospector = paramMapperConfig.getAnnotationIntrospector();
  this._classInfo = paramAnnotatedClass;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:BasicBeanDescription.java


示例9: forClassAnnotations

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
public BasicBeanDescription forClassAnnotations(MapperConfig<?> paramMapperConfig, Class<?> paramClass, ClassIntrospector.MixInResolver paramMixInResolver)
{
  boolean bool = paramMapperConfig.isAnnotationProcessingEnabled();
  AnnotationIntrospector localAnnotationIntrospector = paramMapperConfig.getAnnotationIntrospector();
  if (bool);
  while (true)
  {
    AnnotatedClass localAnnotatedClass = AnnotatedClass.construct(paramClass, localAnnotationIntrospector, paramMixInResolver);
    return new BasicBeanDescription(paramMapperConfig, paramMapperConfig.constructType(paramClass), localAnnotatedClass);
    localAnnotationIntrospector = null;
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:13,代码来源:BasicClassIntrospector.java


示例10: forDirectClassAnnotations

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
public BasicBeanDescription forDirectClassAnnotations(MapperConfig<?> paramMapperConfig, Class<?> paramClass, ClassIntrospector.MixInResolver paramMixInResolver)
{
  boolean bool = paramMapperConfig.isAnnotationProcessingEnabled();
  AnnotationIntrospector localAnnotationIntrospector = paramMapperConfig.getAnnotationIntrospector();
  if (bool);
  while (true)
  {
    AnnotatedClass localAnnotatedClass = AnnotatedClass.constructWithoutSuperTypes(paramClass, localAnnotationIntrospector, paramMixInResolver);
    return new BasicBeanDescription(paramMapperConfig, paramMapperConfig.constructType(paramClass), localAnnotatedClass);
    localAnnotationIntrospector = null;
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:13,代码来源:BasicClassIntrospector.java


示例11: findRootName

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
public SerializedString findRootName(Class<?> paramClass, MapperConfig<?> paramMapperConfig)
{
  monitorenter;
  try
  {
    ClassKey localClassKey = new ClassKey(paramClass);
    SerializedString localSerializedString;
    if (this._rootNames == null)
    {
      this._rootNames = new LRUMap(20, 200);
      BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramMapperConfig.introspectClassAnnotations(paramClass);
      String str = paramMapperConfig.getAnnotationIntrospector().findRootName(localBasicBeanDescription.getClassInfo());
      if (str == null)
        str = paramClass.getSimpleName();
      localSerializedString = new SerializedString(str);
      this._rootNames.put(localClassKey, localSerializedString);
    }
    while (true)
    {
      return localSerializedString;
      localSerializedString = (SerializedString)this._rootNames.get(localClassKey);
      if (localSerializedString == null)
        break;
    }
  }
  finally
  {
    monitorexit;
  }
  throw localObject;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:32,代码来源:RootNameLookup.java


示例12: forClassAnnotations

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
@Override
public BasicBeanDescription forClassAnnotations(MapperConfig<?> cfg,
        Class<?> c, MixInResolver r)
{
    AnnotationIntrospector ai = cfg.getAnnotationIntrospector();
    AnnotatedClass ac = AnnotatedClass.construct(c, ai, r);
    return new BasicBeanDescription(TypeFactory.type(c), ac, ai);
}
 
开发者ID:r00li,项目名称:RHome,代码行数:9,代码来源:BasicClassIntrospector.java


示例13: forDirectClassAnnotations

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
@Override
public BasicBeanDescription forDirectClassAnnotations(MapperConfig<?> cfg,
        Class<?> c, MixInResolver r)
{
    AnnotationIntrospector ai = cfg.getAnnotationIntrospector();
    AnnotatedClass ac = AnnotatedClass.constructWithoutSuperTypes(c, ai, r);
    return new BasicBeanDescription(TypeFactory.type(c), ac, ai);
}
 
开发者ID:r00li,项目名称:RHome,代码行数:9,代码来源:BasicClassIntrospector.java


示例14: construct

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
public static TypeNameIdResolver construct(MapperConfig<?> paramMapperConfig, JavaType paramJavaType, Collection<NamedType> paramCollection, boolean paramBoolean1, boolean paramBoolean2)
{
  if (paramBoolean1 == paramBoolean2)
    throw new IllegalArgumentException();
  if (paramBoolean1);
  for (HashMap localHashMap1 = new HashMap(); ; localHashMap1 = null)
  {
    if (paramBoolean2);
    for (HashMap localHashMap2 = new HashMap(); ; localHashMap2 = null)
    {
      if (paramCollection != null)
      {
        Iterator localIterator = paramCollection.iterator();
        if (localIterator.hasNext())
        {
          NamedType localNamedType = (NamedType)localIterator.next();
          Class localClass = localNamedType.getType();
          if (localNamedType.hasName());
          for (String str = localNamedType.getName(); ; str = _defaultTypeId(localClass))
          {
            if (paramBoolean1)
              localHashMap1.put(localClass.getName(), str);
            if (!paramBoolean2)
              break;
            JavaType localJavaType = (JavaType)localHashMap2.get(str);
            if ((localJavaType != null) && (localClass.isAssignableFrom(localJavaType.getRawClass())))
              break;
            localHashMap2.put(str, paramMapperConfig.constructType(localClass));
            break;
          }
        }
      }
      return new TypeNameIdResolver(paramMapperConfig, paramJavaType, localHashMap1, localHashMap2);
    }
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:37,代码来源:TypeNameIdResolver.java


示例15: _collectAndResolve

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
protected void _collectAndResolve(AnnotatedClass paramAnnotatedClass, NamedType paramNamedType, MapperConfig<?> paramMapperConfig, AnnotationIntrospector paramAnnotationIntrospector, HashMap<NamedType, NamedType> paramHashMap)
{
  if (!paramNamedType.hasName())
  {
    String str = paramAnnotationIntrospector.findTypeName(paramAnnotatedClass);
    if (str != null)
      paramNamedType = new NamedType(paramNamedType.getType(), str);
  }
  if (paramHashMap.containsKey(paramNamedType))
    if ((paramNamedType.hasName()) && (!((NamedType)paramHashMap.get(paramNamedType)).hasName()))
      paramHashMap.put(paramNamedType, paramNamedType);
  List localList;
  do
  {
    return;
    paramHashMap.put(paramNamedType, paramNamedType);
    localList = paramAnnotationIntrospector.findSubtypes(paramAnnotatedClass);
  }
  while ((localList == null) || (localList.isEmpty()));
  Iterator localIterator = localList.iterator();
  label114: NamedType localNamedType1;
  AnnotatedClass localAnnotatedClass;
  if (localIterator.hasNext())
  {
    localNamedType1 = (NamedType)localIterator.next();
    localAnnotatedClass = AnnotatedClass.constructWithoutSuperTypes(localNamedType1.getType(), paramAnnotationIntrospector, paramMapperConfig);
    if (localNamedType1.hasName())
      break label194;
  }
  label194: for (NamedType localNamedType2 = new NamedType(localNamedType1.getType(), paramAnnotationIntrospector.findTypeName(localAnnotatedClass)); ; localNamedType2 = localNamedType1)
  {
    _collectAndResolve(localAnnotatedClass, localNamedType2, paramMapperConfig, paramAnnotationIntrospector, paramHashMap);
    break label114;
    break;
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:37,代码来源:StdSubtypeResolver.java


示例16: BasicBeanDescription

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
protected BasicBeanDescription(MapperConfig<?> paramMapperConfig, JavaType paramJavaType, AnnotatedClass paramAnnotatedClass, List<BeanPropertyDefinition> paramList)
{
  super(paramJavaType);
  this._config = paramMapperConfig;
  if (paramMapperConfig == null);
  for (AnnotationIntrospector localAnnotationIntrospector = null; ; localAnnotationIntrospector = paramMapperConfig.getAnnotationIntrospector())
  {
    this._annotationIntrospector = localAnnotationIntrospector;
    this._classInfo = paramAnnotatedClass;
    this._properties = paramList;
    return;
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:14,代码来源:BasicBeanDescription.java


示例17: nameForField

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
@Override
public String nameForField(MapperConfig<?> config, AnnotatedField field, String defaultName) {
  return convert(defaultName);
}
 
开发者ID:apache,项目名称:samza,代码行数:5,代码来源:SamzaObjectMapper.java


示例18: nameForGetterMethod

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
@Override
public String nameForGetterMethod(MapperConfig<?> config, AnnotatedMethod method, String defaultName) {
  return convert(defaultName);
}
 
开发者ID:apache,项目名称:samza,代码行数:5,代码来源:SamzaObjectMapper.java


示例19: nameForSetterMethod

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
@Override
public String nameForSetterMethod(MapperConfig<?> config, AnnotatedMethod method, String defaultName) {
  return convert(defaultName);
}
 
开发者ID:apache,项目名称:samza,代码行数:5,代码来源:SamzaObjectMapper.java


示例20: findPropertyContentTypeResolver

import org.codehaus.jackson.map.MapperConfig; //导入依赖的package包/类
public TypeResolverBuilder<?> findPropertyContentTypeResolver(MapperConfig<?> paramMapperConfig, AnnotatedMember paramAnnotatedMember, JavaType paramJavaType)
{
  if (!paramJavaType.isContainerType())
    throw new IllegalArgumentException("Must call method with a container type (got " + paramJavaType + ")");
  return _findTypeResolver(paramMapperConfig, paramAnnotatedMember, paramJavaType);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:7,代码来源:JacksonAnnotationIntrospector.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java InMemoryRepository类代码示例发布时间:2022-05-23
下一篇:
Java WSDLOperationMapping类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap