spring-framework / org.springframework.aop.aspectj.annotation / AspectJProxyFactory / getProxy

getProxy

open fun <T : Any> getProxy(): T

Create a new proxy according to the settings in this factory.

Can be called repeatedly. Effect will vary if we've added or removed interfaces. Can add and remove interceptors.

Uses a default class loader: Usually, the thread context class loader (if necessary for proxy creation).

Return
the new proxy

open fun <T : Any> getProxy(classLoader: ClassLoader): T

Create a new proxy according to the settings in this factory.

Can be called repeatedly. Effect will vary if we've added or removed interfaces. Can add and remove interceptors.

Uses the given class loader (if necessary for proxy creation).

Parameters

classLoader - the class loader to create the proxy with

Return
the new proxy