org.springframework.context.annotation

## Class ContextAnnotationAutowireCandidateResolver

- java.lang.Object
- - org.springframework.beans.factory.support.SimpleAutowireCandidateResolver
  - - org.springframework.beans.factory.support.GenericTypeAwareAutowireCandidateResolver
    - - org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver
      - - org.springframework.context.annotation.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

- - ### Field Summary

    - ### Fields inherited from class org.springframework.beans.factory.support.SimpleAutowireCandidateResolver

      `INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContextAnnotationAutowireCandidateResolver()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Object` | `buildLazyResolutionProxy(DependencyDescriptor descriptor, String beanName)`
    `Object` | `getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, String beanName)` Build a proxy for lazy resolution of the actual dependency target, if demanded by the injection point.
    `protected boolean` | `isLazy(DependencyDescriptor descriptor)`

    - ### Methods inherited from class org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver

      `addQualifierType, checkQualifier, checkQualifiers, extractValue, findValue, getFactoryMethodAnnotation, getQualifiedElementAnnotation, getSuggestedValue, hasQualifier, isAutowireCandidate, isQualifier, isRequired, setValueAnnotationType`

    - ### Methods inherited from class org.springframework.beans.factory.support.GenericTypeAwareAutowireCandidateResolver

      `checkGenericTypeMatch, cloneIfNecessary, getBeanFactory, getResolvedDecoratedDefinition, getReturnTypeForFactoryMethod, setBeanFactory`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ContextAnnotationAutowireCandidateResolver

          public ContextAnnotationAutowireCandidateResolver()

  - ### Method Detail

    - #### getLazyResolutionProxyIfNecessary

          @Nullable
          public 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`.

      Specified by:
        `getLazyResolutionProxyIfNecessary` in interface `AutowireCandidateResolver`
      Overrides:
        `getLazyResolutionProxyIfNecessary` in class `SimpleAutowireCandidateResolver`
      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

    - #### isLazy

          protected boolean isLazy(DependencyDescriptor descriptor)

    - #### buildLazyResolutionProxy

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