spring-framework / org.springframework.beans.factory.support / AutowireCandidateResolver / getLazyResolutionProxyIfNecessary

getLazyResolutionProxyIfNecessary

@Nullable open fun getLazyResolutionProxyIfNecessary(descriptor: DependencyDescriptor, @Nullable beanName: String): Any

Build a proxy for lazy resolution of the actual dependency target, if demanded by the injection point.

The default implementation simply returns null.

Parameters

descriptor - the descriptor for the target method parameter or field

beanName - the name of the bean that contains the injection point

Return
the lazy resolution proxy for the actual dependency target, or null if straight resolution is to be performed

Since
4.0