Android + Kotlin + Aspectj
Android + Kotlin + Aspectj
https://yunhos.blogspot.com/2020/03/kotlin-aop.html
여기를 참고해서 설정하고.
@Aspect
class KotlinAspect {
@Before("execution(* com.sugoigroup.mytvapplication*..*(..))")
fun before(joinPoint: JoinPoint) {
val methodSignature = joinPoint!!.signature as MethodSignature
val methodName = methodSignature.name
val startTime = System.currentTimeMillis();
val result = (joinPoint as ProceedingJoinPoint).proceed()
val endTime = System.currentTimeMillis() - startTime
Log.e("LoggingVM", "$methodName ---> $endTime")
}
@After("execution(* demonstrateKotlinAOP(..))")
fun after(joinPoint: JoinPoint) {
}
}
0 comments:
댓글 쓰기