Returns an array of event listeners for a given type that can be manipulated
to add or remove listeners.

@memberOf Benchmark, Benchmark.Suite
@param {String} type The event type.
@returns {Array} The listeners array.
347654
function listeners(type) {
    var me = this,
        events = me.events || (me.events = {});

    return hasKey(events, type) ? events[type] : (events[type] = []);
  }
1183593
function(type) {
            var args = Array.prototype.slice.call(arguments, 1);
            var level = configs.logLevels[this.namespace] || configs.logLevel;

            if (this.logLevel(type) < this.logLevel(level)) {
                return this;
            }
            args.splice(0, 0, "[" + this.namespace + "] [" + type + "]");
            var logMethod = Function.prototype.bind.call(this.handler[type], this.handler);
            logMethod.apply(this.handler[type], args);
        }
848820
function(type, handler)
	{
		var obj = this.__obj;
		
		if (obj)
		{
			switch (true)
			{
				// TODO Remove the last tiny piece of jQuery support?
				case conbo.$ && obj instanceof conbo.$:
				case window.$ && obj instanceof window.$:
				{
					obj.on(type, handler);
					break;
				}
				
				case obj instanceof conbo.EventDispatcher:
				{
					obj.addEventListener(type, handler);
					break;
				}
				
				default:
				{
					var types = type.split(' ');
					
					types.forEach(function(type)
					{
						obj.addEventListener(type, handler);
					});
				}
			}
		}
		
		return this;
	}
1245295
function(type, listener) {
        checkListener(listener);

        var events = this.$e;
        var listeners;

        if (events && (listeners = events[type])) {
            if (isFunction(listeners)) {
                if (listeners === listener) {
                    delete events[type];
                }
            } else {
                for (var i=listeners.length-1; i>=0; i--) {
                    if (listeners[i] === listener) {
                        listeners.splice(i, 1);
                    }
                }
            }
        }

        return this;
    }
1198958
function (type, handler) {

            // Validate arguments
            if (typeof type !== 'string') {
                throw new Error('Type must be a string');
            }
            if (typeof handler !== 'function') {
                throw new Error('Handler must be a function');
            }

            // Check for presence of event store
            if (!this._events) {
                this._events = {};
            }
            if (!this._events[type]) {
                this._events[type] = [];
            }

            // Add handler
            this._events[type].push(handler);

        }
851548
def _create_event_listeners(self):
        """"""
        LOG.debug("Create the event listeners.")
        for event_type, callback in self._event_callback_pairs:
            LOG.debug("Create listener for %r event", event_type)
            listener = self._utils.get_vnic_event_listener(event_type)
            eventlet.spawn_n(listener, callback)
435903
def add_listener(type, once=false, &callback)
      listener = Listener.new(type, callback, once)
      listeners[type] ||= []
      listeners[type] << listener
      emit(:new_listener, self, type, once, callback)
      listener
    end
470495
function eventCheck(obj, type) {
  var t;
  
  if (!obj._events) {
    return false;
  }
  
  t = obj._events[type]
  
  if (typeof t === 'function') {
    return true;
  }
  if (Array.isArray(t) && t.length) {
    return true;
  }
  return false;
}
772810
function(type, data) {
            var handlers,
                i,
                len,
                event = buildEventObject(type, data);

            // if there are handlers for the event, call them in order
            handlers = this._handlers[event.type];
            if (handlers instanceof Array) {
                // @NOTE: do a concat() here to create a copy of the handlers array,
                // so that if another handler is removed of the same type, it doesn't
                // interfere with the handlers array
                handlers = handlers.concat();
                for (i = 0, len = handlers.length; i < len; i++) {
                    if (handlers[i]) {
                        handlers[i].call(this, event);
                    }
                }
            }

            // call handlers for `all` event type
            handlers = this._handlers.all;
            if (handlers instanceof Array) {
                // @NOTE: do a concat() here to create a copy of the handlers array,
                // so that if another handler is removed of the same type, it doesn't
                // interfere with the handlers array
                handlers = handlers.concat();
                for (i = 0, len = handlers.length; i < len; i++) {
                    if (handlers[i]) {
                        handlers[i].call(this, event);
                    }
                }
            }

            return event;
        }
840011
function (type) {
                        this.domReady (function (dom) { var e = document.createEvent ('Event')
                                                            e.initEvent (type, true /* bubbles */, true /* cancellable */)
                                         dom.dispatchEvent (e) }) }
376913
function(element, type, handler) {
      var types = type.split(' ');
      for(var t=0; t<types.length; t++) {
        element.addEventListener(types[t], handler, false);
      }
    }
661533
function Event(type) {
    var me = this;
    return (me == null || me.constructor != Event)
      ? new Event(type)
      : (type instanceof Event)
          ? type
          : extend(me, { 'timeStamp': +new Date }, typeof type == 'string' ? { 'type': type } : type);
  }
331251
function(type, handler) {
      if (!this.listeners_)
        this.listeners_ = Object.create(null);
      if (!(type in this.listeners_)) {
        this.listeners_[type] = [handler];
      } else {
        var handlers = this.listeners_[type];
        if (handlers.indexOf(handler) < 0)
          handlers.push(handler);
      }
    }
902753
@SuppressWarnings("unchecked")
	public <T extends EventListener> T[] getListeners(Class<T> type) {
		final Object[] iListeners = this.listeners;
		final int listenerCount = getListenerCount(iListeners, type);
		final T[] result = (T[]) Array.newInstance(type, listenerCount);
		int j = 0;
		for (int i = iListeners.length - 2; i >= 0; i -= 2) {
			if (iListeners[i] == type) {
				result[j++] = type.cast(iListeners[i + 1]);
			}
		}
		return result;
	}
613809
function (type, fn, context) {
		this._events = this._events || {};

		/* get/init listeners for type */
		var typeListeners = this._events[type];
		if (!typeListeners) {
			typeListeners = {
				listeners: {},
				count: 0
			};
			this._events[type] = typeListeners;
		}

		var contextId = context && context !== this && L.stamp(context),
		    newListener = {fn: fn, ctx: context};

		if (!contextId) {
			contextId = 'no_context';
			newListener.ctx = undefined;
		}

		// fn array for context
		var listeners = typeListeners.listeners[contextId];
		if (!listeners) {
			listeners = [];
			typeListeners.listeners[contextId] = listeners;
		}

		// check if fn already there
		for (var i = 0, len = listeners.length; i < len; i++) {
			if (listeners[i].fn === fn) {
				return;
			}
		}

		listeners.push(newListener);
		typeListeners.count++;
	}
591135
function typeChecker(type) {
  var typeString = "[object " + type + "]";
  return function(value) {
    return Object.prototype.toString.call(value) === typeString;
  };
}
464216
function(type, callback, scope){
            var listeners = _cache[type];
            if (!listeners) {
                return this;
            }
            if(callback){
                var len = listeners.length,
                    tmp = [];
                
                for(var i=0; i<len; i++) {
                    var listener = listeners[i];
                    if(listener.callback == callback && listener.scope == scope) {
                    } else {
                        tmp.push(listener);
                    }
                }
                listeners = tmp;
            }else{
                listeners.length = 0;
            }
            return this;
        }