After
Marks a function inside an Aspect-annotated class as after advice.
The annotated function is invoked at every call site of any function carrying one of the target annotations, after 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 @After declarations may also share the same target, enabling many-to-many relationships between targets and advice.
Example
@After(target = [Authenticated::class, Logged::class])
fun checkAndLog(joinPoint: JoinPoint) { ... }Content copied to clipboard