parameters: (cls)
docstring: Helper for _AddMessageMethods().
docstring_summary: Helper for _AddMessageMethods().
docstring_tokens: Helper for _AddMessageMethods () .
function: def _AddSetListenerMethod(cls):
    """Helper for _AddMessageMethods()."""
    def SetListener(self, listener):
      if listener is None:
        self._listener = message_listener_mod.NullMessageListener()
      else:
        self._listener = listener
    cls._SetListener = SetListener
function_tokens: def _AddSetListenerMethod ( cls ) : def SetListener ( self , listener ) : if listener is None : self . _listener = message_listener_mod . NullMessageListener ( ) else : self . _listener = listener cls . _SetListener = SetListener