Package-level declarations

Types

Link copied to clipboard

Constructor invocation context passed to unsafe constructor callbacks.

Link copied to clipboard
Link copied to clipboard

Invocation context passed to unsafe callbacks.

Functions

Link copied to clipboard
fun injectAfter(method: Method, owner: String? = null, handler: (UnsafeInvocationContext, Any?, Throwable?) -> Unit): UnsafeHandle

Injects a callback after target method execution (Method overload).

fun injectAfter(targetClassName: String, methodName: String, parameterTypeNames: List<String> = emptyList(), owner: String? = null, handler: (UnsafeInvocationContext, Any?, Throwable?) -> Unit): UnsafeHandle

Injects a callback after target method execution (string-based overload).

Link copied to clipboard
fun injectBefore(method: Method, owner: String? = null, handler: (UnsafeInvocationContext) -> Unit): UnsafeHandle

Injects a callback before target method execution (Method overload).

fun injectBefore(targetClassName: String, methodName: String, parameterTypeNames: List<String> = emptyList(), owner: String? = null, handler: (UnsafeInvocationContext) -> Unit): UnsafeHandle

Injects a callback before target method execution (string-based overload).

Link copied to clipboard

Injects a callback after constructor execution (Constructor overload).

fun injectConstructorAfter(targetClassName: String, parameterTypeNames: List<String> = emptyList(), owner: String? = null, handler: (UnsafeConstructorInvocationContext) -> Unit): UnsafeHandle

Injects a callback after constructor execution (string-based overload).

Link copied to clipboard

Injects a callback before constructor execution (Constructor overload).

fun injectConstructorBefore(targetClassName: String, parameterTypeNames: List<String> = emptyList(), owner: String? = null, handler: (UnsafeConstructorInvocationContext) -> Unit): UnsafeHandle

Injects a callback before constructor execution (string-based overload).

Link copied to clipboard
fun injectRedirect(sourceMethod: Method, targetMethod: Method, owner: String? = null): UnsafeHandle

Redirects a source method to another target method (Method overload).

fun injectRedirect(sourceClassName: String, sourceMethodName: String, sourceParameterTypeNames: List<String> = emptyList(), targetClassName: String, targetMethodName: String, targetParameterTypeNames: List<String> = emptyList(), owner: String? = null): UnsafeHandle

Redirects a source method to another target method (string-based overload).

Link copied to clipboard
fun injectReplace(method: Method, owner: String? = null, handler: (UnsafeInvocationContext) -> Any?): UnsafeHandle

Replaces entire target method body (Method overload).

fun injectReplace(targetClassName: String, methodName: String, parameterTypeNames: List<String> = emptyList(), owner: String? = null, handler: (UnsafeInvocationContext) -> Any?): UnsafeHandle

Replaces entire target method body (string-based overload).

Link copied to clipboard

Rolls back one unsafe injection by handle.

Link copied to clipboard

Rolls back all unsafe injections by owner.