proceedAs

Proceeds with the original arguments and returns the result cast to T.

Example

@Around(Scaled::class)
fun doAround(pjp: ProceedingJoinPoint): Any? = pjp.proceedAs<Int>() * 2

Throws

if the result cannot be cast to T.


inline fun <T> ProceedingJoinPoint.proceedAs(vararg args: Any?): T(source)

Proceeds with substituted arguments, as ProceedingJoinPoint.proceed does, and returns the result cast to T.

Throws

if the result cannot be cast to T.


inline suspend fun <T> SuspendProceedingJoinPoint.proceedAs(): T(source)

Proceeds with the original arguments and returns the result cast to T.

Throws

if the result cannot be cast to T.


inline suspend fun <T> SuspendProceedingJoinPoint.proceedAs(vararg args: Any?): T(source)

Proceeds with substituted arguments, as SuspendProceedingJoinPoint.proceed does, and returns the result cast to T.

Throws

if the result cannot be cast to T.