org.springframework.beans.factory.support

## 类 GenericTypeAwareAutowireCandidateResolver

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

- 所有已实现的接口:
    Aware, BeanFactoryAware, AutowireCandidateResolver
  直接已知子类:
    QualifierAnnotationAutowireCandidateResolver

      public class GenericTypeAwareAutowireCandidateResolver
      extends SimpleAutowireCandidateResolver
      implements BeanFactoryAware

  Basic `AutowireCandidateResolver` that performs a full generic type match with the candidate's type if the dependency is declared as a generic type (e.g. Repository<Customer>).

  This is the base class for `QualifierAnnotationAutowireCandidateResolver`, providing an implementation all non-annotation-based resolution steps at this level.

  从以下版本开始:
    4.0
  作者:
    Juergen Hoeller

- - ### 构造器概要

    构造器
    构造器和说明
    `GenericTypeAwareAutowireCandidateResolver()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected boolean` | `checkGenericTypeMatch(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor)` Match the given dependency type with its generic type information against the given candidate bean definition.
    `protected BeanFactory` | `getBeanFactory()`
    `protected RootBeanDefinition` | `getResolvedDecoratedDefinition(RootBeanDefinition rbd)`
    `protected org.springframework.core.ResolvableType` | `getReturnTypeForFactoryMethod(RootBeanDefinition rbd, DependencyDescriptor descriptor)`
    `boolean` | `isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor)` Determine whether the given bean definition qualifies as an autowire candidate for the given dependency.
    `void` | `setBeanFactory(BeanFactory beanFactory)` Callback that supplies the owning factory to a bean instance.

    - ### 从类继承的方法 org.springframework.beans.factory.support.SimpleAutowireCandidateResolver

      `getLazyResolutionProxyIfNecessary, getSuggestedValue, isRequired`

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### GenericTypeAwareAutowireCandidateResolver

          public GenericTypeAwareAutowireCandidateResolver()

  - ### 方法详细资料

    - #### setBeanFactory

          public void setBeanFactory(BeanFactory beanFactory)

      从接口复制的说明: `BeanFactoryAware`
      Callback that supplies the owning factory to a bean instance.

      Invoked after the population of normal bean properties but before an initialization callback such as `InitializingBean.afterPropertiesSet()` or a custom init-method.

      指定者:
        `setBeanFactory` 在接口中 `BeanFactoryAware`
      参数:
        `beanFactory` - owning BeanFactory (never `null`). The bean can immediately call methods on the factory.
      另请参阅:
        `BeanInitializationException`

    - #### getBeanFactory

          @Nullable
          protected final BeanFactory getBeanFactory()

    - #### isAutowireCandidate

          public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder,
                                             DependencyDescriptor descriptor)

      从接口复制的说明: `AutowireCandidateResolver`
      Determine whether the given bean definition qualifies as an autowire candidate for the given dependency.

      The default implementation checks `BeanDefinition.isAutowireCandidate()`.

      指定者:
        `isAutowireCandidate` 在接口中 `AutowireCandidateResolver`
      覆盖:
        `isAutowireCandidate` 在类中 `SimpleAutowireCandidateResolver`
      参数:
        `bdHolder` - the bean definition including bean name and aliases
        `descriptor` - the descriptor for the target method parameter or field
      返回:
        whether the bean definition qualifies as autowire candidate
      另请参阅:
        `BeanDefinition.isAutowireCandidate()`

    - #### checkGenericTypeMatch

          protected boolean checkGenericTypeMatch(BeanDefinitionHolder bdHolder,
                                                  DependencyDescriptor descriptor)

      Match the given dependency type with its generic type information against the given candidate bean definition.

    - #### getResolvedDecoratedDefinition

          @Nullable
          protected RootBeanDefinition getResolvedDecoratedDefinition(RootBeanDefinition rbd)

    - #### getReturnTypeForFactoryMethod

          @Nullable
          protected org.springframework.core.ResolvableType getReturnTypeForFactoryMethod(RootBeanDefinition rbd,
                                                                                                     DependencyDescriptor descriptor)