Returns the handlers registered at class level.
550904
def _get_class_handlers(cls, signal_name, instance):
        
        handlers = cls._signal_handlers_sorted[signal_name]
        return [getattr(instance, hname) for hname in handlers]
759894
def recover_all_handler(self):
        
        for handler in self._handler_cache:
            self.logger.addHandler(handler)
        self._handler_cache = list()
524046
private static void initPrefixHandlers()
    {
        PrefixHandlerConfig[] prefixHandlers = ConfigUtil.getConfig().getPrefixHandlers();
        if ( prefixHandlers == null )
        {
            return;
        }
        for ( int i = 0; i < prefixHandlers.length; i++ )
        {
            try
            {
                Class prefixClass = Class.forName( prefixHandlers[i].getHandlerClass() );
                String name = prefixHandlers[i].getName();
                if ( name == null || name.equals( "" ) )
                {
                    _log.warn( "The name for the prefix handler '" + prefixHandlers[i].getHandlerClass()
                            + "' must not be null" );
                    continue;
                }
                Object o = prefixClass.newInstance();
                if ( !( o instanceof RequestParameterHandler ) )
                {
                    _log.warn( "The class '" + prefixHandlers[i].getHandlerClass()
                            + "' must be an instance of RequestParameterHandler" );
                    continue;
                }
                ProcessPopulate.registerPrefixHandler( name, ( RequestParameterHandler ) o );
            }
            catch ( ClassNotFoundException e )
            {
                _log.warn( "Class '" + prefixHandlers[i].getHandlerClass() + "' not found", e );
            }
            catch ( IllegalAccessException e )
            {
                _log.warn( "Illegal access on Class '" + prefixHandlers[i].getHandlerClass() + "'", e );

            }
            catch ( InstantiationException e )
            {
                _log.warn( "InstantiationException on Class '" + prefixHandlers[i].getHandlerClass() + "'",
                        e.getCause() );
            }
        }
    }
1342749
public function getHandlers()
    {
        $handlers = [];
        foreach ($this->handlers as $key => $handler) {
            $handlers[$key] = $handler->getCallable();
        }

        return $handlers;
    }
396462
def handlers(self):
        """"""
        if getattr(self, '_http'):
            yield from self.http.handlers()
        if getattr(self, '_cli'):
            yield from self.cli.handlers()
391666
def class_register(cls):
    """"""
    cls.handler_registry = {}
    cls.sender_registry = {}
    for method_name in dir(cls):
        method = getattr(cls, method_name)
        if hasattr(method, '_handle'):
            cls.handler_registry.update({method._handle: method_name})
        if hasattr(method, '_sends'):
            cls.sender_registry.update({method._sends: method_name})
    return cls
982166
def u2handlers(self):
    
    # Start with the default set of handlers.
    return_handlers = suds.transport.http.HttpTransport.u2handlers(self)
    return_handlers.extend(self.handlers)

    return return_handlers
1364608
protected static function initHandlers () {
		$className = version_compare(PHP_VERSION, '5.5', '>') ? static::class : get_called_class();
		foreach (static::$handlers as $key => $value) {
			static::$handlers[$key] = [$className, $value];
		}
		register_shutdown_function(static::$handlers['shutdownHandler']);
	}
5956
private JClassType getHandlerForEvent(JClassType eventType) {

		// All handlers event must have an overrided method getAssociatedType().
		// We take advantage of this information to get the associated handler.
		// Ex:
		// com.google.gwt.event.dom.client.ClickEvent
		// ---> com.google.gwt.event.dom.client.ClickHandler
		//
		// com.google.gwt.event.dom.client.BlurEvent
		// ---> com.google.gwt.event.dom.client.BlurHandler

		if (eventType == null) {
			return null;
		}

		JMethod method = eventType
				.findMethod("getAssociatedType", new JType[0]);
		if (method == null) {
			logger.warn(
					"Method 'getAssociatedType()' could not be found in the event '%s'.",
					eventType.getName());
			return null;
		}

		JType returnType = method.getReturnType();
		if (returnType == null) {
			logger.warn(
					"The method 'getAssociatedType()' in the event '%s' returns void.",
					eventType.getName());
			return null;
		}

		JParameterizedType isParameterized = returnType.isParameterized();
		if (isParameterized == null) {
			logger.warn(
					"The method 'getAssociatedType()' in '%s' does not return Type<? extends EventHandler>.",
					eventType.getName());
			return null;
		}

		JClassType[] argTypes = isParameterized.getTypeArgs();
		if ((argTypes.length != 1)
				&& !argTypes[0].isAssignableTo(eventHandlerJClass)) {
			logger.warn(
					"The method 'getAssociatedType()' in '%s' does not return Type<? extends EventHandler>.",
					eventType.getName());
			return null;
		}

		return argTypes[0];
	}
952613
function getHandlers (name, callback, context) {
    var events = [];
    if (!callback && !context) {
        if (name) {
            return (this._events && this._events[name]) || [];
        } else {
            return this._events;
        }
    }
    _.each(this._events, function (value, key) {
        if (!name || key === name) {
            value.forEach(function (event) {
                if ((!callback || event.callback === callback) && (!context || event.context === context)) {
                    events.push(event);
                }
            });
        }
    });
    return events;
}
1275335
public function getHandlers()
    {
        $filters = &gplcart_static('filter.handlers');

        if (isset($filters)) {
            return $filters;
        }

        $filters = array();
        $this->hook->attach('filter.handlers', $filters, $this);

        foreach ($filters as $id => &$filter) {
            $filter['filter_id'] = $id;
            $filter += array(
                'role_id' => array(),
                'status' => true,
                'module' => null
            );
        }

        return $filters;
    }
68906
def show_event_handlers(self, stream=sys.stdout, verbose=0):
        """"""
        lines = ["List of event handlers installed:"]
        for handler in self.event_handlers:
            if verbose:
                lines.extend(handler.__class__.cls2str().split("\n"))
            else:
                lines.extend(str(handler).split("\n"))

        stream.write("\n".join(lines))
        stream.write("\n")
313654
function initHandlers(options, handlerClass) {
    var optHandlers = Array.isArray(options[handlerClass]) ?
          options[handlerClass] : [options[handlerClass]],
      handlers = [];
    optHandlers.forEach(function(handler) {
      if (typeof handler === 'function') {
        handlers.push(handler);
      } else if (typeof handler === 'string' && builtinHandler[handlerClass][handler]) {
        handlers.push(builtinHandler[handlerClass][handler]);
      }
    });
    return handlers;
  }
560828
def is_handler_subclass(cls, classnames=("ViewHandler", "APIHandler")):
    """"""
    if isinstance(cls, list):
        return any(is_handler_subclass(c) for c in cls)
    elif isinstance(cls, type):
        return any(c.__name__ in classnames for c in inspect.getmro(cls))
    else:
        raise TypeError(
            "Unexpected type `{}` for class `{}`".format(
                type(cls),
                cls
            )
        )
850225
def get_class_methods(cls):
    
    return [
        node
        for node in cls.body
        if isinstance(node, ast.FunctionDef)
    ]
566220
def GetAnnotatedMethods(cls):
    """"""

    result = {}

    # We want methods with the highest call-order to be processed last,
    # so that their annotations have precedence.
    for i_cls in reversed(inspect.getmro(cls)):
      for name in compatibility.ListAttrs(i_cls):
        cls_method = getattr(i_cls, name)

        if not callable(cls_method):
          continue

        if not hasattr(cls_method, "__http_methods__"):
          continue

        result[name] = RouterMethodMetadata(
            name=name,
            doc=cls_method.__doc__,
            args_type=getattr(cls_method, "__args_type__", None),
            result_type=getattr(cls_method, "__result_type__", None),
            category=getattr(cls_method, "__category__", None),
            http_methods=getattr(cls_method, "__http_methods__", set()),
            no_audit_log_required=getattr(cls_method,
                                          "__no_audit_log_required__", False))

    return result
17250
def autodoc_event_handlers(stream=sys.stdout):
    
    lines = []
    for cls in all_subclasses(EventHandler):
        if cls in _ABC_EVHANDLER_CLASSES: continue
        event_class = cls.event_class
        lines.extend(cls.cls2str().split("\n"))

        # Here we enforce the abstract protocol of the class
        # The unit test in tests_events will detect the problem.
        if not hasattr(cls, "can_change_physics"):
            raise RuntimeError("%s: can_change_physics must be defined" % cls)

    stream.write("\n".join(lines) + "\n")