if (FallbackBeanLocator.class.isAssignableFrom(beanclass)) { fallbacks.add(beanname); }
  public void init() {    // at this point we actually expect that the "Dead" factory is FULLY    // CREATED. This checks that all dependencies are resolvable (if this    // has not already been checked by the IDE).    String[] beanNames = blankcontext.getBeanDefinitionNames();    ConfigurableListableBeanFactory factory = blankcontext.getBeanFactory();    // prepare our list of dependencies.    rbimap = new HashMap();    lazysources = new StringList();    for (int i = 0; i < beanNames.length; i++) {      String beanname = beanNames[i];      try {        RSACBeanInfo rbi = new RSACBeanInfo();        BeanDefinition def = factory.getBeanDefinition(beanname);        MutablePropertyValues pvs = def.getPropertyValues();        PropertyValue[] values = pvs.getPropertyValues();        for (int j = 0; j < values.length; ++j) {          PropertyValue thispv = values[j];          Object beannames = propertyValueToBeanName(thispv.getValue());          boolean skip = false;          // skip recording the dependency if it was unresolvable (some          // unrecognised          // type) or was a single-valued type referring to a static dependency.          // NB - we now record ALL dependencies - bean-copying strategy          // discontinued.          if (beannames == null          // || beannames instanceof String          // && !blankcontext.containsBean((String) beannames)          ) {            skip = true;          }          if (!skip) {            rbi.recordDependency(thispv.getName(), beannames);          }        }        // yes, I am PERFECTLY aware this is a deprecated method, but it is the        // only        // visible way to determine ahead of time whether this will be a factory        // bean.        // Bit of a problem here with Spring flow - apparently the bean class        // will NOT be set for a "factory-method" bean UNTIL it has been        // instantiated        // via the logic in AbstractAutowireCapableBeanFactory l.376:        // protected BeanWrapper instantiateUsingFactoryMethod(        AbstractBeanDefinition abd = (AbstractBeanDefinition) def;        rbi.factorybean = abd.getFactoryBeanName();        rbi.factorymethod = abd.getFactoryMethodName();        rbi.initmethod = abd.getInitMethodName();        rbi.destroymethod = abd.getDestroyMethodName();        if (abd.hasConstructorArgumentValues()) {          rbi.constructorargvals = abd.getConstructorArgumentValues();        }        if (rbi.factorymethod == null) {          // all right then BE like that! We'll work out the class later.          Class beanclass = def.getBeanClass();          rbi.beanclass = beanclass;          rbi.isfactorybean = FactoryBean.class.isAssignableFrom(beanclass);          if (abd.isLazyInit()) {            lazysources.add(beanname);          }        }        rbimap.put(beanname, rbi);      }      catch (Exception e) {        Logger.log.error("Error loading definition for bean " + beanname, e);      }    }  }