class AsyncInterceptor implements Interceptor {
    AsyncExecutor asyncExecutor = new AsyncExecutorDefault();

    public AsyncInterceptor(AppContext context) {
        context.getBeanAsync(AsyncExecutor.class, bean -> {
            asyncExecutor = bean;
        });
    }

    @Override
    public Object doIntercept(Invocation inv) throws Throwable {<FILL_FUNCTION_BODY>}
}

        Async anno = inv.getMethodAnnotation(Async.class);

        if (anno != null) {
            Future future = asyncExecutor.submit(inv, anno);

            if (inv.method().getReturnType().isAssignableFrom(Future.class)) {
                return future;
            } else {
                return null;
            }
        } else {
            return inv.invoke();
        }
    
<no_super_class>