class CustomDeserializers extends SimpleDeserializers {
    private final EntityFactory entityFactory;
    @Override
    public JsonDeserializer<?> findBeanDeserializer(JavaType type,
                                                    DeserializationConfig config,
                                                    BeanDescription beanDesc) throws JsonMappingException {
        JsonDeserializer<?> deserializer = super.findBeanDeserializer(type, config, beanDesc);

        if (deserializer == null) {

            Class<?> clazz =entityFactory.getInstanceType(type.getRawClass(), false);

            if (clazz == null || clazz == type.getRawClass()) {
                return null;
            }
            addDeserializer((Class) type.getRawClass(), new JsonDeserializer<Object>() {
                @Override
                public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException {
                    return p.readValueAs(clazz);
                }
            });
        }

        return super.findBeanDeserializer(type, config, beanDesc);
    }

    @Override
    public JsonDeserializer<?> findEnumDeserializer(Class<?> type,
                                                    DeserializationConfig config,
                                                    BeanDescription beanDesc) {<FILL_FUNCTION_BODY>}
}

        JsonDeserializer<?> deser = null;
        if (type.isEnum() && EnumDict.class.isAssignableFrom(type)) {
            deser = new EnumDict.EnumDictJSONDeserializer(val -> EnumDict
                .find((Class) type, val)
                .orElse(null));
        }
        return deser;
    
<no_super_class>