Package org.springframework.core.io.support

Examples of org.springframework.core.io.support.ResourcePatternResolver


            logger.debug("[applicationContext] iterates the 'findFiles'"
                    + " classes folders or jar files; size=" + resources.size());
        }

        List<Resource> ctxResources = new LinkedList<Resource>();
        ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
        int index = 0;
        for (ResourceRef ref : resources) {
            index++;
            if (ref.hasModifier("applicationContext")) {
                Resource[] founds = ref.getInnerResources(resourcePatternResolver,
View Full Code Here


   * @return the list of classes that match the requirements to be a report bean.
   */
  private List<Class<? extends Report>> findReportBeans(String basePackage)
      throws IOException, ClassNotFoundException {

    ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
    MetadataReaderFactory metadataReaderFactory =
        new CachingMetadataReaderFactory(resourcePatternResolver);

    List<Class<? extends Report>> candidates = new ArrayList<Class<? extends Report>>();

    String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
        + resolveBasePackage(basePackage) + "/" + "**/*.class";

    Resource[] resources = resourcePatternResolver.getResources(packageSearchPath);

    for (Resource resource : resources) {
      this.addCandidateIfApplicable(resource, metadataReaderFactory, candidates);
    }
    return candidates;
View Full Code Here

TOP

Related Classes of org.springframework.core.io.support.ResourcePatternResolver

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.