SurfReflection

interface SurfReflection

Represents a high-level interface for creating dynamic proxies for classes. The SurfReflection interface enables creation of proxy instances for given classes at runtime, typically for facilitating reflective operations or interception.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun <T> createProxy(clazz: Class<T>): T

Creates a dynamic proxy instance for the specified class using its class loader. This method simplifies the creation of runtime proxies by leveraging the provided class.

abstract fun <T> createProxy(clazz: Class<T>, classLoader: ClassLoader): T

Creates a dynamic proxy instance for the specified class using the provided class loader. This function is typically used for creating runtime proxies to enable reflective operations or to intercept method calls on the provided class type.

Link copied to clipboard
inline fun <T> SurfReflection.createProxy(): T

Creates a dynamic proxy instance for the specified class type using its class loader. This method provides a concise inline approach by leveraging the reified type parameter.