Apply this advice on input joinpoint.

        TODO: improve with internal methods instead of conditional test.

def apply(self, joinpoint):
        """Apply this advice on input joinpoint.

        TODO: improve with internal methods instead of conditional test.
        """

        if self._enable:
            result = self._impl(joinpoint)

        else:
            result = joinpoint.proceed()

        return result