/** * Method for finding out all reachable subtypes for given type, * such that access is by type id, * typically needed for deserialization (converting from type id to type). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedClass baseType) { // for backwards compatibility... return collectAndResolveSubtypes(baseType, config, config.getAnnotationIntrospector()); }
/** * Method for finding out all reachable subtypes for a property specified * by given element (method or field), * such that access is by type, * typically needed for serialization (converting from type to type name). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) { // for backwards compatibility... return collectAndResolveSubtypes(property, config, config.getAnnotationIntrospector(), baseType); }
/** * Method for finding out all reachable subtypes for given type, * such that access is by type, * typically needed for serialization (converting from type to type name). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedClass baseType) { // for backwards compatibility... return collectAndResolveSubtypes(baseType, config, config.getAnnotationIntrospector()); }
/** * Method for finding out all reachable subtypes for a property specified * by given element (method or field), * such that access is by type id, * typically needed for deserialization (converting from type id to type). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) { // for backwards compatibility... return collectAndResolveSubtypes(property, config, config.getAnnotationIntrospector(), baseType); }
/** * Method for finding out all reachable subtypes for a property specified * by given element (method or field), * such that access is by type id, * typically needed for deserialization (converting from type id to type). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) { // for backwards compatibility... return collectAndResolveSubtypes(property, config, config.getAnnotationIntrospector(), baseType); }
/** * Method for finding out all reachable subtypes for given type, * such that access is by type id, * typically needed for deserialization (converting from type id to type). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedClass baseType) { // for backwards compatibility... return collectAndResolveSubtypes(baseType, config, config.getAnnotationIntrospector()); }
/** * Method for finding out all reachable subtypes for given type, * such that access is by type, * typically needed for serialization (converting from type to type name). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedClass baseType) { // for backwards compatibility... return collectAndResolveSubtypes(baseType, config, config.getAnnotationIntrospector()); }
/** * Method for finding out all reachable subtypes for given type, * such that access is by type, * typically needed for serialization (converting from type to type name). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedClass baseType) { // for backwards compatibility... return collectAndResolveSubtypes(baseType, config, config.getAnnotationIntrospector()); }
/** * Method for finding out all reachable subtypes for given type, * such that access is by type id, * typically needed for deserialization (converting from type id to type). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedClass baseType) { // for backwards compatibility... return collectAndResolveSubtypes(baseType, config, config.getAnnotationIntrospector()); }
/** * Method for finding out all reachable subtypes for a property specified * by given element (method or field), * such that access is by type id, * typically needed for deserialization (converting from type id to type). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) { // for backwards compatibility... return collectAndResolveSubtypes(property, config, config.getAnnotationIntrospector(), baseType); }
/** * Method for finding out all reachable subtypes for a property specified * by given element (method or field), * such that access is by type, * typically needed for serialization (converting from type to type name). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) { // for backwards compatibility... return collectAndResolveSubtypes(property, config, config.getAnnotationIntrospector(), baseType); }
/** * Method for finding out all reachable subtypes for a property specified * by given element (method or field), * such that access is by type, * typically needed for serialization (converting from type to type name). * * @param baseType Effective property base type to use; may differ from * actual type of property; for structured types it is content (value) type and NOT * structured type. * * @since 2.6 */ public Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) { // for backwards compatibility... return collectAndResolveSubtypes(property, config, config.getAnnotationIntrospector(), baseType); }
/** * Method called to create a type information serializer for values of given * non-container property * if one is needed. If not needed (no polymorphic handling configured), should * return null. * * @param baseType Declared type to use as the base type for type information serializer * * @return Type serializer to use for property values, if one is needed; null if not. */ public TypeSerializer findPropertyTypeSerializer(JavaType baseType, SerializationConfig config, AnnotatedMember accessor, BeanProperty property) throws JsonMappingException { AnnotationIntrospector ai = config.getAnnotationIntrospector(); TypeResolverBuilder<?> b = ai.findPropertyTypeResolver(config, accessor, baseType); // Defaulting: if no annotations on member, check value class if (b == null) { return createTypeSerializer(config, baseType); } Collection<NamedType> subtypes = config.getSubtypeResolver().collectAndResolveSubtypes(accessor, config, ai); return b.buildTypeSerializer(config, baseType, subtypes); }
/** * Method called to create a type information serializer for values of given * non-container property * if one is needed. If not needed (no polymorphic handling configured), should * return null. * * @param baseType Declared type to use as the base type for type information serializer * * @return Type serializer to use for property values, if one is needed; null if not. */ public TypeSerializer findPropertyTypeSerializer(JavaType baseType, SerializationConfig config, AnnotatedMember accessor) throws JsonMappingException { AnnotationIntrospector ai = config.getAnnotationIntrospector(); TypeResolverBuilder<?> b = ai.findPropertyTypeResolver(config, accessor, baseType); // Defaulting: if no annotations on member, check value class if (b == null) { return createTypeSerializer(config, baseType); } Collection<NamedType> subtypes = config.getSubtypeResolver().collectAndResolveSubtypes( accessor, config, ai, baseType); return b.buildTypeSerializer(config, baseType, subtypes); }
/** * Method called to create a type information serializer for values of given * non-container property * if one is needed. If not needed (no polymorphic handling configured), should * return null. * * @param baseType Declared type to use as the base type for type information serializer * * @return Type serializer to use for property values, if one is needed; null if not. */ public TypeSerializer findPropertyTypeSerializer(JavaType baseType, SerializationConfig config, AnnotatedMember accessor) throws JsonMappingException { AnnotationIntrospector ai = config.getAnnotationIntrospector(); TypeResolverBuilder<?> b = ai.findPropertyTypeResolver(config, accessor, baseType); // Defaulting: if no annotations on member, check value class if (b == null) { return createTypeSerializer(config, baseType); } Collection<NamedType> subtypes = config.getSubtypeResolver().collectAndResolveSubtypes( accessor, config, ai, baseType); return b.buildTypeSerializer(config, baseType, subtypes); }
/** * Method called to create a type information serializer for values of given * container property * if one is needed. If not needed (no polymorphic handling configured), should * return null. * * @param containerType Declared type of the container to use as the base type for type information serializer * * @return Type serializer to use for property value contents, if one is needed; null if not. */ public TypeSerializer findPropertyContentTypeSerializer(JavaType containerType, SerializationConfig config, AnnotatedMember accessor) throws JsonMappingException { JavaType contentType = containerType.getContentType(); AnnotationIntrospector ai = config.getAnnotationIntrospector(); TypeResolverBuilder<?> b = ai.findPropertyContentTypeResolver(config, accessor, containerType); // Defaulting: if no annotations on member, check value class if (b == null) { return createTypeSerializer(config, contentType); } Collection<NamedType> subtypes = config.getSubtypeResolver().collectAndResolveSubtypes(accessor, config, ai); return b.buildTypeSerializer(config, contentType, subtypes); }
/** * Method called to create a type information serializer for values of given * container property * if one is needed. If not needed (no polymorphic handling configured), should * return null. * * @param containerType Declared type of the container to use as the base type for type information serializer * * @return Type serializer to use for property value contents, if one is needed; null if not. */ public TypeSerializer findPropertyContentTypeSerializer(JavaType containerType, SerializationConfig config, AnnotatedMember accessor) throws JsonMappingException { JavaType contentType = containerType.getContentType(); AnnotationIntrospector ai = config.getAnnotationIntrospector(); TypeResolverBuilder<?> b = ai.findPropertyContentTypeResolver(config, accessor, containerType); // Defaulting: if no annotations on member, check value class if (b == null) { return createTypeSerializer(config, contentType); } Collection<NamedType> subtypes = config.getSubtypeResolver().collectAndResolveSubtypes(accessor, config, ai, contentType); return b.buildTypeSerializer(config, contentType, subtypes); }
/** * Method called to create a type information serializer for values of given * container property * if one is needed. If not needed (no polymorphic handling configured), should * return null. * * @param containerType Declared type of the container to use as the base type for type information serializer * * @return Type serializer to use for property value contents, if one is needed; null if not. */ public TypeSerializer findPropertyContentTypeSerializer(JavaType containerType, SerializationConfig config, AnnotatedMember accessor) throws JsonMappingException { JavaType contentType = containerType.getContentType(); AnnotationIntrospector ai = config.getAnnotationIntrospector(); TypeResolverBuilder<?> b = ai.findPropertyContentTypeResolver(config, accessor, containerType); // Defaulting: if no annotations on member, check value class if (b == null) { return createTypeSerializer(config, contentType); } Collection<NamedType> subtypes = config.getSubtypeResolver().collectAndResolveSubtypes(accessor, config, ai, contentType); return b.buildTypeSerializer(config, contentType, subtypes); }
/** * Method called to create a type information serializer for values of given * container property * if one is needed. If not needed (no polymorphic handling configured), should * return null. * * @param containerType Declared type of the container to use as the base type for type information serializer * * @return Type serializer to use for property value contents, if one is needed; null if not. */ public TypeSerializer findPropertyContentTypeSerializer(JavaType containerType, SerializationConfig config, AnnotatedMember accessor) throws JsonMappingException { JavaType contentType = containerType.getContentType(); AnnotationIntrospector ai = config.getAnnotationIntrospector(); TypeResolverBuilder<?> b = ai.findPropertyContentTypeResolver(config, accessor, containerType); // Defaulting: if no annotations on member, check value class if (b == null) { return createTypeSerializer(config, contentType); } Collection<NamedType> subtypes = config.getSubtypeResolver().collectAndResolveSubtypes(accessor, config, ai, contentType); return b.buildTypeSerializer(config, contentType, subtypes); }
/** * Method called to construct a type serializer for values with given declared * base type. This is called for values other than those of bean property * types. */ @Override public TypeSerializer createTypeSerializer(SerializationConfig config, JavaType baseType) { BeanDescription bean = config.introspectClassAnnotations(baseType.getRawClass()); AnnotatedClass ac = bean.getClassInfo(); AnnotationIntrospector ai = config.getAnnotationIntrospector(); TypeResolverBuilder<?> b = ai.findTypeResolver(config, ac, baseType); /* Ok: if there is no explicit type info handler, we may want to * use a default. If so, config object knows what to use. */ Collection<NamedType> subtypes = null; if (b == null) { b = config.getDefaultTyper(baseType); } else { subtypes = config.getSubtypeResolver().collectAndResolveSubtypes(ac, config, ai); } if (b == null) { return null; } return b.buildTypeSerializer(config, baseType, subtypes); }