Package org.springframework.beans.factory.support

Examples of org.springframework.beans.factory.support.AbstractBeanDefinitionReader


          // Instantiate the specified BeanDefinitionReader
          BeanDefinitionReader readerInstance =
              readerClass.getConstructor(BeanDefinitionRegistry.class).newInstance(this.registry);
          // Delegate the current ResourceLoader to it if possible
          if (readerInstance instanceof AbstractBeanDefinitionReader) {
            AbstractBeanDefinitionReader abdr = ((AbstractBeanDefinitionReader) readerInstance);
            abdr.setResourceLoader(this.resourceLoader);
            abdr.setEnvironment(this.environment);
          }
          readerInstanceCache.put(readerClass, readerInstance);
        }
        catch (Exception ex) {
          throw new IllegalStateException("Could not instantiate BeanDefinitionReader class [" + readerClass.getName() + "]");
View Full Code Here


        try {
          // Instantiate the specified BeanDefinitionReader
          reader = readerClass.getConstructor(BeanDefinitionRegistry.class).newInstance(this.registry);
          // Delegate the current ResourceLoader to it if possible
          if (reader instanceof AbstractBeanDefinitionReader) {
            AbstractBeanDefinitionReader abdr = ((AbstractBeanDefinitionReader) reader);
            abdr.setResourceLoader(this.resourceLoader);
            abdr.setEnvironment(this.environment);
          }
          readerInstanceCache.put(readerClass, reader);
        }
        catch (Exception ex) {
          throw new IllegalStateException(
View Full Code Here

    Resource source = ResourceConfiguredModule.resourceBasedConfigurationFile(definition, classLoaderToUse);
    if (source == null) {
      return new PassthruModuleOptionsMetadata();
    }

    AbstractBeanDefinitionReader reader = source.getFilename().endsWith("xml") ?
        new XmlBeanDefinitionReader(beanFactory):
        new GroovyBeanDefinitionReader(beanFactory);

    reader.setResourceLoader(new PathMatchingResourcePatternResolver(classLoaderToUse));

    reader.loadBeanDefinitions(source);

    return defaultModuleOptionsMetadataCollector.collect(beanFactory);

  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.support.AbstractBeanDefinitionReader

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.