org.springframework.beans.factory.config

## Class NamedBeanHolder<T>

- java.lang.Object
- - org.springframework.beans.factory.config.NamedBeanHolder<T>

- Type Parameters:
    `T` - the bean type
  All Implemented Interfaces:
    NamedBean

      public class NamedBeanHolder<T>
      extends Object
      implements NamedBean

  A simple holder for a given bean name plus bean instance.
  Since:
    4.3.3
  Author:
    Juergen Hoeller
  See Also:
    `AutowireCapableBeanFactory.resolveNamedBean(Class)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NamedBeanHolder(String beanName, T beanInstance)` Create a new holder for the given bean name plus instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `getBeanInstance()` Return the corresponding bean instance.
    `String` | `getBeanName()` Return the name of the bean.

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

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

- - ### Constructor Detail

    - #### NamedBeanHolder

          public NamedBeanHolder(String beanName,
                                 T beanInstance)

      Create a new holder for the given bean name plus instance.
      Parameters:
        `beanName` - the name of the bean
        `beanInstance` - the corresponding bean instance

  - ### Method Detail

    - #### getBeanName

          public String getBeanName()

      Return the name of the bean.
      Specified by:
        `getBeanName` in interface `NamedBean`

    - #### getBeanInstance

          public T getBeanInstance()

      Return the corresponding bean instance.