class RejectedInvocationHandler implements InvocationHandler {

    private final Object target;

    public RejectedInvocationHandler(Object target) {
        this.target = target;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {<FILL_FUNCTION_BODY>}

    /**
     * Do sth before reject.
     *
     * @param runnable the runnable
     * @param executor ThreadPoolExecutor instance
     */
    private void beforeReject(Runnable runnable, Executor executor) {
        AwareManager.beforeReject(runnable, executor);
    }

    /**
     * Do sth after reject.
     *
     * @param runnable the runnable
     * @param executor ThreadPoolExecutor instance
     */
    private void afterReject(Runnable runnable, Executor executor) {
        AwareManager.afterReject(runnable, executor);
    }
}

        beforeReject((Runnable) args[0], (Executor) args[1]);
        try {
            return method.invoke(target, args);
        } catch (InvocationTargetException ex) {
            throw ex.getCause();
        } finally {
            afterReject((Runnable) args[0], (Executor) args[1]);
        }
    
<no_super_class>