-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05f8150
commit 51c896b
Showing
8 changed files
with
125 additions
and
140 deletions.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
events/src/main/kotlin/org/sirius/events/AbstractEventListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
package org.sirius.events | ||
|
||
/* | ||
* @COPYRIGHT (C) 2023 Andreas Ernst | ||
* | ||
* All rights reserved | ||
*/ | ||
abstract class AbstractEventListener<T> { | ||
abstract fun on(event: T) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.sirius.events | ||
/* | ||
* @COPYRIGHT (C) 2023 Andreas Ernst | ||
* | ||
* All rights reserved | ||
*/ | ||
|
||
import kotlin.Throwable | ||
|
||
class EventError : Error { | ||
constructor(message: String) : super(message) {} | ||
|
||
constructor(message: String, throwable: Throwable) : super(message, throwable) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package org.sirius.events | ||
|
||
/* | ||
* @COPYRIGHT (C) 2023 Andreas Ernst | ||
* | ||
* All rights reserved | ||
*/ | ||
import kotlin.reflect.KClass | ||
|
||
@MustBeDocumented | ||
@Retention(AnnotationRetention.RUNTIME) | ||
@Target(AnnotationTarget.CLASS) | ||
annotation class EventListener( | ||
val name: String = "", | ||
//val name: String = "", | ||
val event: KClass<out Any> | ||
) |
6 changes: 5 additions & 1 deletion
6
events/src/main/kotlin/org/sirius/events/EventListenerDescriptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.