get Arg Or Null
Returns the annotation argument value for the parameter named paramName, cast to T, or null if no such parameter exists or the value cannot be cast to T.
Returns the argument value for the parameter named name, cast to T, or null if no such parameter exists or the value cannot be cast to T.
Example
@Before(target = [Logged::class])
fun doBefore(jp: JoinPoint) {
val label = jp.getArgOrNull<String>("label") ?: "unknown"
}Content copied to clipboard