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); }
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); } }
/** * 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); }
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); }
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; }
protected TypeDeserializerBase(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty) { this._baseType = paramJavaType; this._idResolver = paramTypeIdResolver; this._property = paramBeanProperty; this._deserializers = new HashMap(); }
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()); }
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; }
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); } }
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); }
public AsPropertyTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty, String paramString) { super(paramJavaType, paramTypeIdResolver, paramBeanProperty); this._typePropertyName = paramString; }
public AsArrayTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty) { super(paramJavaType, paramTypeIdResolver, paramBeanProperty); }
protected TypeSerializerBase(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty) { this._idResolver = paramTypeIdResolver; this._property = paramBeanProperty; }
public TypeIdResolver getTypeIdResolver() { return this._idResolver; }
public AsWrapperTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty) { super(paramJavaType, paramTypeIdResolver, paramBeanProperty); }
public AsWrapperTypeSerializer(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty) { super(paramTypeIdResolver, paramBeanProperty); }
public AsPropertyTypeSerializer(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty, String paramString) { super(paramTypeIdResolver, paramBeanProperty); this._typePropertyName = paramString; }
public AsArrayTypeSerializer(TypeIdResolver paramTypeIdResolver, BeanProperty paramBeanProperty) { super(paramTypeIdResolver, paramBeanProperty); }
public AsPropertyTypeDeserializer(JavaType bt, TypeIdResolver idRes, String propName) { super(bt, idRes); _propertyName = propName; }
public AsArrayTypeDeserializer(JavaType bt, TypeIdResolver idRes) { super(bt, idRes); }
protected TypeSerializerBase(TypeIdResolver idRes) { _idResolver = idRes; }
public AsWrapperTypeDeserializer(JavaType bt, TypeIdResolver idRes) { super(bt, idRes); }
public AsWrapperTypeSerializer(TypeIdResolver idRes) { super(idRes); }
public AsPropertyTypeSerializer(TypeIdResolver idRes, String propName) { super(idRes); _propertyName = propName; }
public AsArrayTypeSerializer(TypeIdResolver idRes) { super(idRes); }
protected TypeDeserializerBase(JavaType baseType, TypeIdResolver idRes) { _baseType = baseType; _idResolver = idRes; _deserializers = new HashMap<String,JsonDeserializer<Object>>(); }
@Override public TypeIdResolver getTypeIdResolver() { return _idResolver; }