AsEventHandler<T extends DiagnosticEvent> class

Adapter class to use an EventHandlerFunction as a DiagnosticEventHandler. Since this class inherits TypedEventHandler it can filter on event type.

Inheritance

Constructors

AsEventHandler(EventHandlerFunction<T> handler)
Creates a new AsEventHandler wrapping .
const

Properties

handler → EventHandlerFunction<T>
The function that handles the event.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

handleEvent(DiagnosticEvent event, {required OriginSpace space, required DiagnosticEventContext context}) → void
Implements a filter on the handled event type. Should not be overridden by subclasses, override handleTypedEvent instead.
inherited
handleTypedEvent(T event, {required OriginSpace space, required DiagnosticEventContext context}) → void
Handles a typed event, called when the event type matches. To be implemented by subclasses.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited