Java 类org.codehaus.jackson.map.jsontype.TypeIdResolver 实例源码

项目:12306-android-Decompile    文件:StdTypeResolverBuilder.java   
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);
}
项目:RHome    文件:StdTypeResolverBuilder.java   
public TypeDeserializer buildTypeDeserializer(JavaType baseType,
        Collection<NamedType> subtypes)
{
    TypeIdResolver idRes = idResolver(baseType, subtypes, false, true);

    // First, method for converting type info to type id:
    switch (_includeAs) {
    case WRAPPER_ARRAY:
        return new AsArrayTypeDeserializer(baseType, idRes);
    case PROPERTY:
        return new AsPropertyTypeDeserializer(baseType, idRes, _typeProperty);
    case WRAPPER_OBJECT:
        return new AsWrapperTypeDeserializer(baseType, idRes);
    default:
        throw new IllegalStateException("Do not know how to construct standard type serializer for inclusion type: "+_includeAs);
    }
}
项目:RHome    文件:StdTypeResolverBuilder.java   
/**
 * Helper method that will either return configured custom
 * type id resolver, or construct a standard resolver
 * given configuration.
 */
protected TypeIdResolver idResolver(JavaType baseType, Collection<NamedType> subtypes,
        boolean forSer, boolean forDeser)
{
    // Custom id resolver?
    if (_customIdResolver != null) {
        return _customIdResolver;
    }
    if (_idType == null) {
        throw new IllegalStateException("Can not build, 'init()' not yet called");
    }
    switch (_idType) {
    case CLASS:
        return new ClassNameIdResolver(baseType);
    case MINIMAL_CLASS:
        return new MinimalClassNameIdResolver(baseType);
    case NAME:
        return TypeNameIdResolver.construct(baseType, subtypes, forSer, forDeser);

    case CUSTOM: // need custom resolver...
    case NONE: // hmmh. should never get this far with 'none'
    }
    throw new IllegalStateException("Do not know how to construct standard type id resolver for idType: "+_idType);
}
项目:12306-android-Decompile    文件:StdTypeResolverBuilder.java   
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);
}
项目:ingress-indonesia-dev    文件:StdTypeResolverBuilder.java   
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);
}
项目:12306-android-Decompile    文件:StdTypeResolverBuilder.java   
public StdTypeResolverBuilder init(JsonTypeInfo.Id paramId, TypeIdResolver paramTypeIdResolver)
{
  if (paramId == null)
    throw new IllegalArgumentException("idType can not be null");
  this._idType = paramId;
  this._customIdResolver = paramTypeIdResolver;
  this._typeProperty = paramId.getDefaultPropertyName();
  return this;
}
项目:12306-android-Decompile    文件:TypeDeserializerBase.java   
protected TypeDeserializerBase(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  this._baseType = paramJavaType;
  this._idResolver = paramTypeIdResolver;
  this._property = paramBeanProperty;
  this._deserializers = new HashMap();
}
项目:12306-android-Decompile    文件:MapperConfig.java   
public TypeIdResolver typeIdResolverInstance(Annotated paramAnnotated, Class<? extends TypeIdResolver> paramClass)
{
  HandlerInstantiator localHandlerInstantiator = getHandlerInstantiator();
  if (localHandlerInstantiator != null)
  {
    TypeIdResolver localTypeIdResolver = localHandlerInstantiator.typeIdResolverInstance(this, paramAnnotated, paramClass);
    if (localTypeIdResolver != null)
      return localTypeIdResolver;
  }
  return (TypeIdResolver)ClassUtil.createInstance(paramClass, canOverrideAccessModifiers());
}
项目:RHome    文件:StdTypeResolverBuilder.java   
public StdTypeResolverBuilder init(JsonTypeInfo.Id idType, TypeIdResolver idRes)
{
    // sanity checks
    if (idType == null) {
        throw new IllegalArgumentException("idType can not be null");
    }
    _idType = idType;
    _customIdResolver = idRes;
    // Let's also initialize property name as per idType default
    _typeProperty = idType.getDefaultPropertyName();
    return this;
}
项目:RHome    文件:StdTypeResolverBuilder.java   
public TypeSerializer buildTypeSerializer(JavaType baseType,
        Collection<NamedType> subtypes)
{
    TypeIdResolver idRes = idResolver(baseType, subtypes, true, false);
    switch (_includeAs) {
    case WRAPPER_ARRAY:
        return new AsArrayTypeSerializer(idRes);
    case PROPERTY:
        return new AsPropertyTypeSerializer(idRes, _typeProperty);
    case WRAPPER_OBJECT:
        return new AsWrapperTypeSerializer(idRes);
    default:
        throw new IllegalStateException("Do not know how to construct standard type serializer for inclusion type: "+_includeAs);
    }
}
项目:12306-android-Decompile    文件:StdTypeResolverBuilder.java   
public StdTypeResolverBuilder init(JsonTypeInfo.Id paramId, TypeIdResolver paramTypeIdResolver)
{
  if (paramId == null)
    throw new IllegalArgumentException("idType can not be null");
  this._idType = paramId;
  this._customIdResolver = paramTypeIdResolver;
  this._typeProperty = paramId.getDefaultPropertyName();
  return this;
}
项目:12306-android-Decompile    文件:TypeDeserializerBase.java   
protected TypeDeserializerBase(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  this._baseType = paramJavaType;
  this._idResolver = paramTypeIdResolver;
  this._property = paramBeanProperty;
  this._deserializers = new HashMap();
}
项目:12306-android-Decompile    文件:MapperConfig.java   
public TypeIdResolver typeIdResolverInstance(Annotated paramAnnotated, Class<? extends TypeIdResolver> paramClass)
{
  HandlerInstantiator localHandlerInstantiator = getHandlerInstantiator();
  if (localHandlerInstantiator != null)
  {
    TypeIdResolver localTypeIdResolver = localHandlerInstantiator.typeIdResolverInstance(this, paramAnnotated, paramClass);
    if (localTypeIdResolver != null)
      return localTypeIdResolver;
  }
  return (TypeIdResolver)ClassUtil.createInstance(paramClass, canOverrideAccessModifiers());
}
项目:ingress-indonesia-dev    文件:StdTypeResolverBuilder.java   
public StdTypeResolverBuilder init(JsonTypeInfo.Id paramId, TypeIdResolver paramTypeIdResolver)
{
  if (paramId == null)
    throw new IllegalArgumentException("idType can not be null");
  this._idType = paramId;
  this._customIdResolver = paramTypeIdResolver;
  this._typeProperty = paramId.getDefaultPropertyName();
  return this;
}
项目:ingress-indonesia-dev    文件:TypeDeserializerBase.java   
protected TypeDeserializerBase(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty, Class<?> paramClass)
{
  this._baseType = paramJavaType;
  this._idResolver = paramTypeIdResolver;
  this._property = paramBeanProperty;
  this._deserializers = new HashMap();
  if (paramClass == null)
  {
    this._defaultImpl = null;
    return;
  }
  this._defaultImpl = paramJavaType.forcedNarrowBy(paramClass);
}
项目:ingress-indonesia-dev    文件:MapperConfig.java   
public TypeIdResolver typeIdResolverInstance(Annotated paramAnnotated, Class<? extends TypeIdResolver> paramClass)
{
  HandlerInstantiator localHandlerInstantiator = getHandlerInstantiator();
  if (localHandlerInstantiator != null)
  {
    TypeIdResolver localTypeIdResolver = localHandlerInstantiator.typeIdResolverInstance(this, paramAnnotated, paramClass);
    if (localTypeIdResolver != null)
      return localTypeIdResolver;
  }
  return (TypeIdResolver)ClassUtil.createInstance(paramClass, canOverrideAccessModifiers());
}
项目:12306-android-Decompile    文件:AsPropertyTypeDeserializer.java   
public AsPropertyTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty, String paramString)
{
  super(paramJavaType, paramTypeIdResolver, paramBeanProperty);
  this._typePropertyName = paramString;
}
项目:12306-android-Decompile    文件:AsArrayTypeDeserializer.java   
public AsArrayTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  super(paramJavaType, paramTypeIdResolver, paramBeanProperty);
}
项目:12306-android-Decompile    文件:TypeSerializerBase.java   
protected TypeSerializerBase(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  this._idResolver = paramTypeIdResolver;
  this._property = paramBeanProperty;
}
项目:12306-android-Decompile    文件:TypeSerializerBase.java   
public TypeIdResolver getTypeIdResolver()
{
  return this._idResolver;
}
项目:12306-android-Decompile    文件:AsWrapperTypeDeserializer.java   
public AsWrapperTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  super(paramJavaType, paramTypeIdResolver, paramBeanProperty);
}
项目:12306-android-Decompile    文件:AsWrapperTypeSerializer.java   
public AsWrapperTypeSerializer(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  super(paramTypeIdResolver, paramBeanProperty);
}
项目:12306-android-Decompile    文件:AsPropertyTypeSerializer.java   
public AsPropertyTypeSerializer(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty, String paramString)
{
  super(paramTypeIdResolver, paramBeanProperty);
  this._typePropertyName = paramString;
}
项目:12306-android-Decompile    文件:AsArrayTypeSerializer.java   
public AsArrayTypeSerializer(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  super(paramTypeIdResolver, paramBeanProperty);
}
项目:12306-android-Decompile    文件:TypeDeserializerBase.java   
public TypeIdResolver getTypeIdResolver()
{
  return this._idResolver;
}
项目:RHome    文件:AsPropertyTypeDeserializer.java   
public AsPropertyTypeDeserializer(JavaType bt, TypeIdResolver idRes, String propName)
{
    super(bt, idRes);
    _propertyName = propName;
}
项目:RHome    文件:AsArrayTypeDeserializer.java   
public AsArrayTypeDeserializer(JavaType bt, TypeIdResolver idRes)
{
    super(bt, idRes);
}
项目:RHome    文件:TypeSerializerBase.java   
protected TypeSerializerBase(TypeIdResolver idRes)
{
    _idResolver = idRes;
}
项目:RHome    文件:AsWrapperTypeDeserializer.java   
public AsWrapperTypeDeserializer(JavaType bt, TypeIdResolver idRes)
{
    super(bt, idRes);
}
项目:RHome    文件:AsWrapperTypeSerializer.java   
public AsWrapperTypeSerializer(TypeIdResolver idRes)
{
    super(idRes);
}
项目:RHome    文件:AsPropertyTypeSerializer.java   
public AsPropertyTypeSerializer(TypeIdResolver idRes, String propName)
{
    super(idRes);
    _propertyName = propName;
}
项目:RHome    文件:AsArrayTypeSerializer.java   
public AsArrayTypeSerializer(TypeIdResolver idRes)
{
    super(idRes);
}
项目:RHome    文件:TypeDeserializerBase.java   
protected TypeDeserializerBase(JavaType baseType, TypeIdResolver idRes)
{
    _baseType = baseType;
    _idResolver = idRes;
    _deserializers = new HashMap<String,JsonDeserializer<Object>>();
}
项目:RHome    文件:TypeDeserializerBase.java   
@Override    
public TypeIdResolver getTypeIdResolver() { return _idResolver; }
项目:12306-android-Decompile    文件:AsPropertyTypeDeserializer.java   
public AsPropertyTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty, String paramString)
{
  super(paramJavaType, paramTypeIdResolver, paramBeanProperty);
  this._typePropertyName = paramString;
}
项目:12306-android-Decompile    文件:AsArrayTypeDeserializer.java   
public AsArrayTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  super(paramJavaType, paramTypeIdResolver, paramBeanProperty);
}
项目:12306-android-Decompile    文件:TypeSerializerBase.java   
protected TypeSerializerBase(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  this._idResolver = paramTypeIdResolver;
  this._property = paramBeanProperty;
}
项目:12306-android-Decompile    文件:TypeSerializerBase.java   
public TypeIdResolver getTypeIdResolver()
{
  return this._idResolver;
}
项目:12306-android-Decompile    文件:AsWrapperTypeDeserializer.java   
public AsWrapperTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  super(paramJavaType, paramTypeIdResolver, paramBeanProperty);
}
项目:12306-android-Decompile    文件:AsWrapperTypeSerializer.java   
public AsWrapperTypeSerializer(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty)
{
  super(paramTypeIdResolver, paramBeanProperty);
}