Package org.springframework.beans.factory.wiring

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


       
        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

   * @param annotation the Configurable annotation found on the bean class
   * @return the resolved BeanWiringInfo
   */
  protected BeanWiringInfo buildWiringInfo(Object beanInstance, Configurable annotation) {
    if (!Autowire.NO.equals(annotation.autowire())) {
      return new BeanWiringInfo(annotation.autowire().value(), annotation.dependencyCheck());
    }
    else {
      if (!"".equals(annotation.value())) {
        // explicitly specified bean name
        return new BeanWiringInfo(annotation.value(), false);
      }
      else {
        // default bean name
        return new BeanWiringInfo(getDefaultBeanName(beanInstance), true);
      }
    }
  }
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

        }
       
        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

  }

  @Test
  public void testResolveWiringInfoWithAnInstanceOfANonAnnotatedClass() {
    AnnotationBeanWiringInfoResolver resolver = new AnnotationBeanWiringInfoResolver();
    BeanWiringInfo info = resolver.resolveWiringInfo("java.lang.String is not @Configurable");
    assertNull("Must be returning null for a non-@Configurable class instance", info);
  }
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.