class type extended from Event
@EventType("MyEvent") class MyEvent : Event { mixin basciEventType!MyEvent; }
Note: You need to declare an EventType UDA otherwise this won't compile!
@EventType("MyEvent") class MyEvent : Event { mixin basicEventType!MyEvent; } MyEvent event = new MyEvent(); assertEquals(event.staticEventType, "MyEvent"); assertEquals(event.staticEventType, event.eventType); assertTrue(event.isEventTypeOf(MyEvent.staticEventType));
Quick way to implement your default abstract and static methods
Call this mixin template on your custom event. This will generate your getters for the EventType.