Before
Marks a function inside an Aspect-annotated class as before advice.
The annotated function is invoked at every call site of any function carrying one of the target annotations, before the target function body executes. The injection is performed at compile time by the AspectK compiler plugin.
The advice function must declare exactly one parameter of type JoinPoint.
Multiple target annotations may be listed; the advice will be applied to all of them. Multiple @Before declarations may also share the same target, enabling many-to-many relationships between targets and advice.
Example
@Before(target = [Authenticated::class, Logged::class])
fun checkAndLog(joinPoint: JoinPoint) { ... }Content copied to clipboard