title: How can I understand whether a bean exists in runtime?
body: <p>For example, I have a class</p>
  
  <pre><code>public class Car{
       private Motor motor;
  
       public void setMotor(Motor motor){
            this.motor = motor;
       }   
  }
  </code></pre>
  
  <p>My bean looks like </p>
  
  <pre><code>&lt;bean id="car" class="Car"&gt;
      &lt;property name="motor" ref="${motorProvider.getAvailableMotor()}"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>This method:     <code>motorProvider.getAvailableMotor()</code> returns a bean name(string), of which motor I should use. </p>
  
  <p>But there can be a situation when such bean(with such name) is not created. How can I check it?</p>