org.springframework.beans.factory.support

## Class SimpleAutowireCandidateResolver

- java.lang.Object
- - org.springframework.beans.factory.support.SimpleAutowireCandidateResolver

- All Implemented Interfaces:
    AutowireCandidateResolver

      public class SimpleAutowireCandidateResolver
      extends Object
      implements AutowireCandidateResolver

  `AutowireCandidateResolver` implementation to use when no annotation support is available. This implementation checks the bean definition only.
  Since:
    2.5
  Author:
    Mark Fisher, Juergen Hoeller
  See Also:
    `BeanDefinition.isAutowireCandidate()`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleAutowireCandidateResolver()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, String beanName)` Build a proxy for lazy resolution of the actual dependency target, if demanded by the injection point.
    `Object` | `getSuggestedValue(DependencyDescriptor descriptor)` Determine whether a default value is suggested for the given dependency.
    `boolean` | `isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor)` Determine if the provided bean definition is an autowire candidate.

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

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

- - ### Constructor Detail

    - #### SimpleAutowireCandidateResolver

          public SimpleAutowireCandidateResolver()

  - ### Method Detail

    - #### isAutowireCandidate

          public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder,
                                             DependencyDescriptor descriptor)

      Determine if the provided bean definition is an autowire candidate.

      To be considered a candidate the bean's autowire-candidate attribute must not have been set to 'false'.

      Specified by:
        `isAutowireCandidate` in interface `AutowireCandidateResolver`
      Parameters:
        `bdHolder` - the bean definition including bean name and aliases
        `descriptor` - the descriptor for the target method parameter or field
      Returns:
        whether the bean definition qualifies as autowire candidate

    - #### getSuggestedValue

          public Object getSuggestedValue(DependencyDescriptor descriptor)

      Description copied from interface: `AutowireCandidateResolver`
      Determine whether a default value is suggested for the given dependency.
      Specified by:
        `getSuggestedValue` in interface `AutowireCandidateResolver`
      Parameters:
        `descriptor` - the descriptor for the target method parameter or field
      Returns:
        the value suggested (typically an expression String), or `null` if none found

    - #### getLazyResolutionProxyIfNecessary

          public Object getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor,
                                                          String beanName)

      Description copied from interface: `AutowireCandidateResolver`
      Build a proxy for lazy resolution of the actual dependency target, if demanded by the injection point.
      Specified by:
        `getLazyResolutionProxyIfNecessary` in interface `AutowireCandidateResolver`
      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