Examples of FactoryBean


Examples of com.sun.faces.config.beans.FactoryBean

            fcb = (FacesConfigBean) digester.peek();
        } catch (Exception e) {
            throw new IllegalStateException
                ("No parent FacesConfigBean on object stack");
        }
        FactoryBean fb = fcb.getFactory();
        if (fb == null) {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[FactoryRule]{" +
                                           digester.getMatch() +
                                           "} New " + CLASS_NAME);

Examples of org.springframework.beans.factory.FactoryBean

    greeter.greet();
    final Factory factory = (Factory)yan.getInstance("myfactory");
    factory.create();
    final Factory factory2 = (Factory)yan.getInstance("myfactory2");
    factory2.create();
    final FactoryBean fb = SpringAdapter.getFactoryBean(yan, "myController");
    assertNotNull(fb);
  }

Examples of org.springframework.beans.factory.FactoryBean

      public void run() throws Exception {
        foo.noop();
      }
    };
    bench.start(true);
    FactoryBean fb = SpringAdapter.getFactoryBean(yan, "fooProxy");
    assertNotNull(fb);
  }

Examples of org.springframework.beans.factory.FactoryBean

      final Component fbc = SpringAdapter.getFactoryBeanComponent(c);
      if(fbc!=null){
        //I am Factory Bean
        if(includeFactoryBeans){
          //attempt to match the FactoryBean result.
          final FactoryBean fb = (FactoryBean)instantiate(fbc);
          if(!includePrototypes && !fb.isSingleton()){
            continue;
          }
          final Class fbt = fb.getObjectType();
          if(type==null || ReflectionUtil.isAssignableFrom(type, fbt)){
            final String beanname = (String)key;
            listener.onFactoryBean(beanname, fb);
            continue;
          }

Examples of org.springframework.beans.factory.FactoryBean

      final Component fbc = SpringAdapter.getFactoryBeanComponent(c);
      if(requiredType==null){
        return instantiate(c);
      }
      if(fbc!=null){
        final FactoryBean fb = (FactoryBean)instantiate(fbc);
        final Class ctype = fb.getObjectType();
        checkBeanType(beanname, requiredType, ctype);
        return instantiate(beanname, fb);
      }
      else{
        final Class ctype = c.getType();

Examples of org.springframework.beans.factory.FactoryBean

  throws NoSuchBeanDefinitionException {
    final Component c = getComponent(name);
    if(!BeanFactoryUtils.isFactoryDereference(name)){
      final Component fbc = SpringAdapter.getFactoryBeanComponent(c);
      if(fbc!=null){
        final FactoryBean fb = (FactoryBean)instantiate(fbc);
        return fb.isSingleton();
      }
    }
    return c.isSingleton();
  }

Examples of org.springframework.beans.factory.FactoryBean

  throws NoSuchBeanDefinitionException {
    final Component c = getComponent(name);
    if(!BeanFactoryUtils.isFactoryDereference(name)){
      final Component fbc = SpringAdapter.getFactoryBeanComponent(c);
      if(fbc!=null){
        final FactoryBean fb = (FactoryBean)instantiate(fbc);
        return fb.getObjectType();
      }
    }
    return c.getType();
  }

Examples of org.springframework.beans.factory.FactoryBean

        Class beanClass = predictBeanType(beanName, mbd, true);
        if (beanClass != null && FactoryBean.class.isAssignableFrom(beanClass)) {
          if (BeanFactoryUtils.isFactoryDereference(name)) {
            return true;
          }
          FactoryBean factoryBean = (FactoryBean) getBean(FACTORY_BEAN_PREFIX + beanName);
          return factoryBean.isSingleton();
        }
        else {
          return !BeanFactoryUtils.isFactoryDereference(name);
        }
      }

Examples of org.springframework.beans.factory.FactoryBean

      if (BeanFactoryUtils.isFactoryDereference(name)) {
        return false;
      }
      Class beanClass = predictBeanType(beanName, mbd, true);
      if (beanClass != null && FactoryBean.class.isAssignableFrom(beanClass)) {
        FactoryBean factoryBean = (FactoryBean) getBean(FACTORY_BEAN_PREFIX + beanName);
        return ((factoryBean instanceof SmartFactoryBean && ((SmartFactoryBean) factoryBean).isPrototype()) ||
            !factoryBean.isSingleton());
      }
      else {
        return false;
      }
    }

Examples of org.springframework.beans.factory.FactoryBean

  protected Class getTypeForFactoryBean(String beanName, RootBeanDefinition mbd) {
    if (!mbd.isSingleton()) {
      return null;
    }
    try {
      FactoryBean factoryBean = (FactoryBean) getBean(FACTORY_BEAN_PREFIX + beanName);
      return getTypeForFactoryBean(factoryBean);
    }
    catch (BeanCreationException ex) {
      // Can only happen when getting a FactoryBean.
      logger.debug("Ignoring bean creation exception on FactoryBean type check", ex);
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.