code: public <T> T getBean(final Class<T> beanClass){
      if(beanFactory == null)
        throw new BeanCreationException("SpringUtil.getBean(...) called on a non-managed SpringUtil instance.");
  
      // Figure out what's stored in 'BEAN_NAME'
      try{
        return beanFactory.getBean(readBeanName(beanClass), beanClass);
      }catch(final Exception ex){
        // Couldn't load by BEAN_NAME, inaccessible. Let's load by class.
        return beanFactory.getBean(beanClass);
      }
    }
docs: Takes the given beanClass (which is probably an interface) and requests
  that Spring instantiate a bean for that class. The underlying mechanism is
  specific to us, in that we expect the beanClass to have a static String
  'BEAN_NAME', which we will then pass to Spring to get our bean.
  <p>
  Ideally, you should RARELY need this method, as you'd have all your needed
  beans injected into your class automatically by Spring. If you choose to
  use this method, please check with Jason to make sure there isn't a better
  way!
  
  @throws org.springframework.beans.BeansException If there is a problem loading the bean or it does not have a
  'BEAN_NAME' property