spring-framework / org.springframework.aop.target / HotSwappableTargetSource / swap

swap

open fun swap(newTarget: Any): Any

Swap the target, returning the old target object.

Parameters

newTarget - the new target object

Exceptions

IllegalArgumentException - if the new target is invalid

Return
the old target object