Package org.springframework.config.java.annotation

Examples of org.springframework.config.java.annotation.AutoBean


  }

  @Override
  public void otherMethod(ConfigurationProcessor configurationProcessor, String configurerBeanName,
      Class<?> configurerClass, Method m) {
    AutoBean autoBean = AnnotationUtils.findAnnotation(m, AutoBean.class);
    if (autoBean != null) {
      // Create a bean definition for this class
      if (m.getReturnType().isInterface()) {
        throw new BeanDefinitionStoreException("Cannot use AutoBean of interface type " + m.getReturnType()
            + ": don't know what class to instantiate; processing @AutoBean method " + m);
      }

      RootBeanDefinition bd = new RootBeanDefinition(m.getReturnType());
      bd.setAutowireMode(autoBean.autowire().value());
      configurationProcessor.registerBeanDefinition(m.getName(), bd, !Modifier.isPublic(m.getModifiers()));
      // one bean definition created
      configurationProcessor.beanDefsGenerated++;
    }
View Full Code Here

TOP

Related Classes of org.springframework.config.java.annotation.AutoBean

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.