spring-framework / org.springframework.aop.support / AopUtils / getTargetClass

getTargetClass

open static fun getTargetClass(candidate: Any): Class<*>

Determine the target class of the given bean instance which might be an AOP proxy.

Returns the target class for an AOP proxy or the plain class otherwise.

Parameters

candidate - the instance to check (might be an AOP proxy)

Return
the target class (or the plain class of the given object as fallback; never null)

See Also
org.springframework.aop.TargetClassAware#getTargetClass()org.springframework.aop.framework.AopProxyUtils#ultimateTargetClass(Object)