Package org.springframework.beans.factory.wiring

Examples of org.springframework.beans.factory.wiring.BeanWiringInfo


  }

  @Test
  public void testResolveWiringInfoWithAnInstanceOfAnAnnotatedClass() {
    AnnotationBeanWiringInfoResolver resolver = new AnnotationBeanWiringInfoResolver();
    BeanWiringInfo info = resolver.resolveWiringInfo(new Soap());
    assertNotNull("Must *not* be returning null for a non-@Configurable class instance", info);
  }
View Full Code Here


  }

  @Test
  public void testResolveWiringInfoWithAnInstanceOfAnAnnotatedClassWithAutowiringTurnedOffExplicitly() {
    AnnotationBeanWiringInfoResolver resolver = new AnnotationBeanWiringInfoResolver();
    BeanWiringInfo info = resolver.resolveWiringInfo(new WirelessSoap());
    assertNotNull("Must *not* be returning null for an @Configurable class instance even when autowiring is NO", info);
    assertFalse(info.indicatesAutowiring());
    assertEquals(WirelessSoap.class.getName(), info.getBeanName());
  }
View Full Code Here

  }

  @Test
  public void testResolveWiringInfoWithAnInstanceOfAnAnnotatedClassWithAutowiringTurnedOffExplicitlyAndCustomBeanName() {
    AnnotationBeanWiringInfoResolver resolver = new AnnotationBeanWiringInfoResolver();
    BeanWiringInfo info = resolver.resolveWiringInfo(new NamedWirelessSoap());
    assertNotNull("Must *not* be returning null for an @Configurable class instance even when autowiring is NO", info);
    assertFalse(info.indicatesAutowiring());
    assertEquals("DerBigStick", info.getBeanName());
  }
View Full Code Here

       
        final String beanName = bn;
        setBeanWiringInfoResolver(new BeanWiringInfoResolver() {
            public BeanWiringInfo resolveWiringInfo(Object instance) {
                if (null != beanName && !"".equals(beanName)) {
                    return new BeanWiringInfo(beanName);
                }
                return null;
            }
        });
       
View Full Code Here

       
        final String beanName = bn;
        setBeanWiringInfoResolver(new BeanWiringInfoResolver() {
            public BeanWiringInfo resolveWiringInfo(Object instance) {
                if (null != beanName && !"".equals(beanName)) {
                    return new BeanWiringInfo(beanName);
                }
                return null;
            }
        });
       
View Full Code Here

       
        final String beanName = bn;
        setBeanWiringInfoResolver(new BeanWiringInfoResolver() {
            public BeanWiringInfo resolveWiringInfo(Object instance) {
                if (!"".equals(beanName)) {
                    return new BeanWiringInfo(beanName);
                }
                return null;
            }
        });
       
View Full Code Here

        throw new IllegalArgumentException("Cannot find bean named '" + beanName + "'");
      }
      configurer.setBeanWiringInfoResolver(new BeanWiringInfoResolver() {

        public BeanWiringInfo resolveWiringInfo(Object beanInstance) {
          return new BeanWiringInfo(beanName);
        }
      });
    }

    configurer.afterPropertiesSet();
View Full Code Here

    if (StringUtils.hasText(templateBeanName)) {
      if (beanFactory.containsBean(templateBeanName)) {
        beanConfigurer.setBeanWiringInfoResolver(new BeanWiringInfoResolver() {
          @Override public BeanWiringInfo resolveWiringInfo(final Object beanInstance) {
            return new BeanWiringInfo(templateBeanName);
          }
        });
      }
      else {
        throw new IllegalArgumentException(String.format(
View Full Code Here

       
        final String beanName = bn;
        setBeanWiringInfoResolver(new BeanWiringInfoResolver() {
            public BeanWiringInfo resolveWiringInfo(Object instance) {
                if (null != beanName && !"".equals(beanName)) {
                    return new BeanWiringInfo(beanName);
                }
                return null;
            }
        });
       
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.wiring.BeanWiringInfo

Copyright © 2018 www.massapicom. 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.