presto-main/src/main/java/io/prestosql/security/AccessControlModule.java/AccessControlModule/getDelegate
class AccessControlModule:    @Provides
    @Singleton
    public AccessControl createAccessControl(AccessControlManager accessControlManager)
    {
        Logger logger = Logger.get(AccessControl.class);

        AccessControl loggingInvocationsAccessControl = newProxy(
                AccessControl.class,
                new LoggingInvocationHandler(
                        accessControlManager,
                        new LoggingInvocationHandler.ReflectiveParameterNamesProvider(),
                        logger::debug));

        return new ForwardingAccessControl()
        {
            @Override
            protected AccessControl getDelegate()
            {
                if (logger.isDebugEnabled()) {
                    return loggingInvocationsAccessControl;
                }
                return accessControlManager;
            }
        };
    }