All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.Interceptor.kt Maven / Gradle / Ivy

The newest version!
package ch.softappeal.yass2

import kotlin.reflect.KFunction

public typealias Invocation = () -> Any?
public typealias Interceptor = (function: KFunction<*>, parameters: List, invoke: Invocation) -> Any?

public typealias SuspendInvocation = suspend () -> Any?
public typealias SuspendInterceptor = suspend (function: KFunction<*>, parameters: List, invoke: SuspendInvocation) -> Any?

public operator fun Interceptor.plus(intercept: Interceptor): Interceptor = { function, parameters, invoke ->
    this(function, parameters) { intercept(function, parameters, invoke) }
}

public operator fun SuspendInterceptor.plus(intercept: SuspendInterceptor): SuspendInterceptor = { function, parameters, invoke ->
    this(function, parameters) { intercept(function, parameters, invoke) }
}

@Target(AnnotationTarget.CLASS)
public annotation class GenerateProxy




© 2015 - 2025 Weber Informatics LLC | Privacy Policy