Class ContextAnnotationAutowireCandidateResolver

All Implemented Interfaces:
Cloneable, Aware, BeanFactoryAware, AutowireCandidateResolver

public class ContextAnnotationAutowireCandidateResolver extends QualifierAnnotationAutowireCandidateResolver
Complete implementation of the AutowireCandidateResolver strategy interface, providing support for qualifier annotations as well as for lazy resolution driven by the Lazy annotation in the context.annotation package.
Since:
4.0
Author:
Juergen Hoeller
  • Constructor Details

    • ContextAnnotationAutowireCandidateResolver

      public ContextAnnotationAutowireCandidateResolver()
  • Method Details

    • getLazyResolutionProxyIfNecessary

      public @Nullable Object getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, @Nullable String beanName)
      Description copied from interface: AutowireCandidateResolver
      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
      Returns:
      the lazy resolution proxy for the actual dependency target, or null if straight resolution is to be performed
    • getLazyResolutionProxyClass

      public @Nullable Class<?> getLazyResolutionProxyClass(DependencyDescriptor descriptor, @Nullable String beanName)
      Description copied from interface: AutowireCandidateResolver
      Determine the proxy class for lazy resolution of the 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
      Returns:
      the lazy resolution proxy class for the dependency target, if any
    • isLazy

      protected boolean isLazy(DependencyDescriptor descriptor)
    • buildLazyResolutionProxy

      protected Object buildLazyResolutionProxy(DependencyDescriptor descriptor, @Nullable String beanName)