/** * Method that will try to construct a {@link BeanSerializer} for * given class. Returns null if no properties are found. */ public JsonSerializer<Object> findBeanSerializer(SerializerProvider prov, JavaType type, BeanDescription beanDesc) throws JsonMappingException { // First things first: we know some types are not beans... if (!isPotentialBeanType(type.getRawClass())) { // 03-Aug-2012, tatu: Except we do need to allow serializers for Enums, // as per [databind#24] if (!type.isEnumType()) { return null; } } return constructBeanSerializer(prov, beanDesc); }
/** * Deprecated method; final to help identify problems with sub-classes, * as this method will NOT be called any more in 2.1 * * @deprecated Since 2.1, do not pass 'property' argument */ @Deprecated protected final JsonSerializer<Object> constructBeanSerializer(SerializerProvider prov, BeanDescription beanDesc, BeanProperty property) throws JsonMappingException { return constructBeanSerializer(prov, beanDesc); }
/** * Method that will try to construct a {@link BeanSerializer} for * given class. Returns null if no properties are found. */ public JsonSerializer<Object> findBeanSerializer(SerializerProvider prov, JavaType type, BeanDescription beanDesc) throws JsonMappingException { // First things first: we know some types are not beans... if (!isPotentialBeanType(type.getRawClass())) { // 03-Aug-2012, tatu: Except we do need to allow serializers for Enums, // as per [Issue#24] if (!type.isEnumType()) { return null; } } return constructBeanSerializer(prov, beanDesc); }
/** * Method that will try to construct a {@link BeanSerializer} for * given class. Returns null if no properties are found. */ public JsonSerializer<Object> findBeanSerializer(SerializerProvider prov, JavaType type, BeanDescription beanDesc) throws JsonMappingException { // First things first: we know some types are not beans... if (!isPotentialBeanType(type.getRawClass())) { // 03-Aug-2012, tatu: Except we do need to allow serializers for Enums, // as per [databind#24] if (!type.isEnumType()) { return null; } } return constructBeanSerializer(prov, beanDesc); }
/** * Method that will try to construct a {@link BeanSerializer} for * given class. Returns null if no properties are found. */ public JsonSerializer<Object> findBeanSerializer(SerializerProvider prov, JavaType type, BeanDescription beanDesc) throws JsonMappingException { // First things first: we know some types are not beans... if (!isPotentialBeanType(type.getRawClass())) { // 03-Aug-2012, tatu: Except we do need to allow serializers for Enums, // as per [Issue#24] if (!type.isEnumType()) { return null; } } return constructBeanSerializer(prov, beanDesc); }
/** * Method that will try to construct a {@link BeanSerializer} for * given class. Returns null if no properties are found. */ public JsonSerializer<Object> findBeanSerializer(SerializerProvider prov, JavaType type, BeanDescription beanDesc) throws JsonMappingException { // First things first: we know some types are not beans... if (!isPotentialBeanType(type.getRawClass())) { // 03-Aug-2012, tatu: Except we do need to allow serializers for Enums, // as per [databind#24] if (!type.isEnumType()) { return null; } } return constructBeanSerializer(prov, beanDesc); }
/** * Method that will try to construct a {@link BeanSerializer} for * given class. Returns null if no properties are found. */ @SuppressWarnings("unchecked") public JsonSerializer<Object> findBeanSerializer(SerializerProvider prov, JavaType type, BeanDescription beanDesc, BeanProperty property) throws JsonMappingException { // First things first: we know some types are not beans... if (!isPotentialBeanType(type.getRawClass())) { return null; } JsonSerializer<Object> serializer = constructBeanSerializer(prov, beanDesc, property); // [JACKSON-440] Need to allow overriding actual serializer, as well... if (_factoryConfig.hasSerializerModifiers()) { for (BeanSerializerModifier mod : _factoryConfig.serializerModifiers()) { serializer = (JsonSerializer<Object>)mod.modifySerializer(prov.getConfig(), beanDesc, serializer); } } return serializer; }
/** * Method that will try to construct a {@link BeanSerializer} for * given class. Returns null if no properties are found. */ @SuppressWarnings("unchecked") public JsonSerializer<Object> findBeanSerializer(SerializerProvider prov, JavaType type, BeanDescription beanDesc) throws JsonMappingException { // First things first: we know some types are not beans... if (!isPotentialBeanType(type.getRawClass())) { // 03-Aug-2012, tatu: Except we do need to allow serializers for Enums, // as per [Issue#24] if (!type.isEnumType()) { return null; } } JsonSerializer<Object> serializer = constructBeanSerializer(prov, beanDesc); // [JACKSON-440] Need to allow overriding actual serializer, as well... if (_factoryConfig.hasSerializerModifiers()) { for (BeanSerializerModifier mod : _factoryConfig.serializerModifiers()) { serializer = (JsonSerializer<Object>)mod.modifySerializer(prov.getConfig(), beanDesc, serializer); } } return serializer; }