Auto-wire and call the child class's handle method.

@since 1.0.0
171997
public function handler()
    {
        if ($this->allow_public_access) {
            Container::resolve_method($this, 'handle');
            return;
        }

        if (empty($this->restrict_to_roles) || \in_array(User_Utils::get_user_role()->name, $this->restrict_to_roles)) {
            Container::resolve_method($this, 'handle');
            return;
        }

        \wp_send_json_error('You do not have sufficient permissions to perform this action', 403);
    }
871790
function() {
    if (this.handler) {
      this.handler();
      if (mindmaps.DEBUG) {
        console.log("handler called for", this.id);
      }
    } else {
      if (mindmaps.DEBUG) {
        console.log("no handler found for", this.id);
      }
    }
  }
1060704
@FFDCIgnore(ClassCastException.class)
    void autoBind(WSName subname, Object obj) throws InvalidNameException, NotContextException, NameAlreadyBoundException {
        ContextNode target = this, parent = this;
        int i = 0;
        try {
            for (/* int i = 0 */; i < subname.size() - 1; i++) {
                String elem = subname.get(i);
                target = (ContextNode) target.children.get(elem);
                // create an auto-deleteable subcontext
                if (target == null) {
                    target = new ContextNode(parent, elem, true);
                    Object existingEntry = parent.children.putIfAbsent(elem, target);
                    if (existingEntry != null) {
                        // another thread just beat me to it creating this entry
                        // assume it is a context and continue
                        target = (ContextNode) existingEntry;
                    }
                }
                parent = target;
            }
        } catch (ClassCastException e) {
            throw new NotContextException("" + fullName.plus(subname.getPrefix(i + 1)));
        }
        // allow multiple entries during invocation by JndiServiceBinder
        boolean replaced = false;
        String lastName = subname.getLast();
        AutoBindNode abNode = new AutoBindNode(obj);
        while (!replaced) {
            Object oldObj = target.children.putIfAbsent(lastName, abNode);
            if (oldObj != null) {
                if (oldObj instanceof AutoBindNode) {
                    abNode = (AutoBindNode) oldObj;
                    // This synch ensures that addition of entries to an 
                    // AutoBindNode does not take place during removal of 
                    // the same AutoBindNode.
                    synchronized (abNode) {
                        abNode.addLastEntry(obj);
                        // This is a no-op in the normal case, but if we're racing an unbind, 
                        // we might need to modify a different AutoBindNode
                        replaced = target.children.replace(lastName, oldObj, abNode);
                    }
                } else {
                    throw new NameAlreadyBoundException("" + fullName.plus(lastName));
                }
            } else {
                replaced = true;
            }
        }
    }
953748
private void handleMainMethodIfPresent(List methods) {
        boolean found = false;
        for (Iterator iter = methods.iterator(); iter.hasNext();) {
            MethodNode node = (MethodNode) iter.next();
            if(node.getName().equals("main")) {
                if (node.isStatic() && node.getParameters().length == 1) {
                    boolean retTypeMatches, argTypeMatches;
                    ClassNode argType = node.getParameters()[0].getType();
                    ClassNode retType = node.getReturnType();

                    argTypeMatches = (argType.equals(ClassHelper.OBJECT_TYPE) || argType.getName().contains("String[]"));
                    retTypeMatches = (retType == ClassHelper.VOID_TYPE || retType == ClassHelper.OBJECT_TYPE);
                    
                    if(retTypeMatches && argTypeMatches) {
                        if(found) {
                            throw new RuntimeException("Repetitive main method found.");
                        } else {
                            found = true;
                        }
                        // if script has both loose statements as well as main(), then main() is ignored
                        if(statementBlock.isEmpty()) {
                            addStatement(node.getCode());
                        }
                        iter.remove();
                    }
                }
            }
        }
    }
1154311
def on(self, handler):
        """"""
        if not hasattr(handler, '__call__'):
            raise TypeError('handler is not a callable object.')
        self.handlers.add(handler)
401479
public void init() {
        if (initialized) {
            return;
        }
        Widget parent = inputWidget.getParent();
        while (parent != null && !parent.getClass().getName().equals("com.google.gwt.user.client.ui.Widget")) {
            helpBlock = findHelpBlock(inputWidget);
            if (helpBlock != null) {
                break;
            } else {
                parent = parent.getParent();
            }
        }
        initialized = true;
    }
833115
@Override
    public void run() {
        try {
            handle();
        } catch (Exception e) {
            Throwables.throwIfUnchecked(e);
            throw new RuntimeException(e);
        }
    }
287537
public Callable<?> handle(Object instance, Method origin, Object[] arguments) throws Throwable {
        try {
            return (Callable<?>) mAdvice.getClass().getMethod("handle", Object.class, Method.class,
                    Object[].class).invoke(mAdvice, instance, origin, arguments);
        } catch (InvocationTargetException e) {
            throw e.getCause();
        }
    }
310609
private function executeHandlers()
	{
        $this->state = self::STATE_HANDLING;
    	    
    	$this->handleRouter();
    	$this->handleSessions();
    	$this->handleLogout();
    	$this->handleDictionary($_COOKIE, $this->getSetting('fallbacklocale')); //Handle Dictionary
    }
718789
private void executeHandlers(List<Event> filteredEvents) {
        for (EventHandler current : eventHandlers) {
            for (Event event : filteredEvents) {
                current.handleEvent(event);
            }
        }
    }
608144
public function trigger()
    {
        $this->trace = debug_backtrace();

        $this->reporter = get_class($this);
        if (isset($this->trace[$this->offset]['class'])) {
            $this->reporter = $this->trace[$this->offset]['class'];
        }

        if (isset($this->trace[$this->offset]['file'])) {
            $this->file = $this->trace[$this->offset]['file'];
        }

        if (isset($this->trace[$this->offset]['line'])) {
            $this->line = $this->trace[$this->offset]['line'];
        }

        if (!empty($this->variables)) {
            $this->message = vsprintf($this->message, $this->variables);
            $this->variables = array();
        }

        throw $this;
    }
404298
static void initHandlers() {
		if (config != null && config.getHandlers() != null) {
			// initialize handlers
			for (Object handler : config.getHandlers()) {
				// If the handler is configured as just a string, it's a fully qualified class
				// name with a default constructor.
				if (handler instanceof String) {
					initStringDefinedHandler((String) handler);
				} else if (handler instanceof Map) {
					initMapDefinedHandler((Map<String, Object>) handler);
				}
			}
		}
	}
1032010
protected function _execute()
    {
        if (!$this->enabled() && !$this->focused()) {
            return;
        }
        foreach ($this->_children as $child) {
            if ($this->suite()->failfast()) {
                break;
            }
            $this->_passed = $child->process() && $this->_passed;
        }
    }
145815
public function activate(): void
    {
        if ($this->stopBuffering) {
            $this->buffering = false;
        }
        if (!$this->handler instanceof HandlerInterface) {
            $record = end($this->buffer) ?: null;

            $this->handler = call_user_func($this->handler, $record, $this);
            if (!$this->handler instanceof HandlerInterface) {
                throw new \RuntimeException("The factory callable should return a HandlerInterface");
            }
        }
        $this->handler->handleBatch($this->buffer);
        $this->buffer = [];
    }
1190838
protected void attachParentListener() {

        final AutoRelease ar = ClassUtility.getLastClassAnnotation(this.getClass(), AutoRelease.class);

        // Only manage automatic release when the annotation exists with true value
        if (ar != null && ar.value() && node() != null) { // TODO check rootnode null when using NullView

            // Allow to release the model if the root business object doesn't exist anymore
            node().parentProperty().addListener(new ChangeListener<Node>() {

                @Override
                public void changed(final ObservableValue<? extends Node> observable, final Node oldValue, final Node newValue) {
                    if (newValue != null) {
                        AbstractBaseModel.this.hasBeenAttached = true;
                    }
                    if (newValue == null && AbstractBaseModel.this.hasBeenAttached) {
                        AbstractBaseModel.this.hasBeenAttached = false;
                        release();
                        node().parentProperty().removeListener(this);
                    }
                }

            });
        }
    }
354739
public static function trigger(
        $class,
        string $name,
        self $event = null
    ): void {
        $wildcardEventHandlers = [];
        foreach (static::$_eventWildcards as
            $nameWildcard => $classHandlers) {
            if (!StringHelper::matchWildcard($nameWildcard, $name)) {
                continue;
            }
            $wildcardEventHandlers = array_merge(
                $wildcardEventHandlers,
                $classHandlers
            );
        }

        if (
            empty(static::$_events[$name])
            && empty($wildcardEventHandlers)
        ) {
            return;
        }

        $event === null && $event = new static;
        $event->handled = false;
        $event->name = $name;

        if (is_object($class)) {
            $event->sender === null && $event->sender = $class;
            $class = get_class($class);
        } else {
            $class = ltrim($class, '\\');
        }

        $classes = array_merge(
            [$class],
            class_parents($class, true),
            class_implements($class, true)
        );

        foreach ($classes as $class) {
            $eventHandlers = [];
            foreach ($wildcardEventHandlers as $classWildcard => $handlers) {
                if (StringHelper::matchWildcard($classWildcard, $class)) {
                    $eventHandlers = array_merge($eventHandlers, $handlers);
                    unset($wildcardEventHandlers[$classWildcard]);
                }
            }

            if (!empty(static::$_events[$name][$class])) {
                $eventHandlers = array_merge(
                    $eventHandlers,
                    static::$_events[$name][$class]
                );
            }

            foreach ($eventHandlers as $handler) {
                $event->data = $handler[1];
                call_user_func($handler[0], $event);
                if ($event->handled) {
                    return;
                }
            }
        }
    }
361609
protected static void appendHandler(Class<? extends LogRecordHandler> parent, LogRecordHandler child){
    List<LogRecordHandler> toAdd = new LinkedList<LogRecordHandler>();
    //--Find Parents
    for(LogRecordHandler term : handlers){
      if(parent.isAssignableFrom(term.getClass())){
        toAdd.add(term);
      }
    }
    //--Add Handler
    for(LogRecordHandler p : toAdd){
      appendHandler(p, child);
    }
  }