get Arg
Returns the annotation argument value for the parameter named paramName, cast to T.
Example
@Before(target = [RateLimit::class])
fun doBefore(jp: JoinPoint) {
val info = jp.findAnnotation<RateLimit>()!!
val maxCalls = info.getArg<Int>("maxCalls")
}Content copied to clipboard
Throws
Returns the argument value for the parameter named name, cast to T.
Example
@Around(target = [Transactional::class])
fun doAround(pjp: ProceedingJoinPoint): Any? {
val userId = pjp.getArg<String>("userId")
return pjp.proceed()
}Content copied to clipboard