Examples of findCandidateComponents()


Examples of org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents()

        false);
    componentProvider.addIncludeFilter(new AnnotationTypeFilter(Document.class));
    componentProvider.addIncludeFilter(new AnnotationTypeFilter(Persistent.class));

    Set<String> classes = new ManagedSet<String>();
    for (BeanDefinition candidate : componentProvider.findCandidateComponents(basePackage)) {
      classes.add(candidate.getBeanClassName());
    }

    return classes;
  }
View Full Code Here

Examples of org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents()

    for (String basePackage : getBasePackages()) {
      if (logger.isDebugEnabled()) {
        logger.debug("scanning package " + basePackage);
      }
      Collection<BeanDefinition> components = scanner.findCandidateComponents(basePackage);
      for (BeanDefinition definition : components) {
        result.add((ScannedGenericBeanDefinition)definition);
      }
    }
View Full Code Here

Examples of org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents()

        componentProvider.addIncludeFilter(new AnnotationTypeFilter(NodeEntity.class));
        componentProvider.addIncludeFilter(new AnnotationTypeFilter(RelationshipEntity.class));

        Set<String> classes = new ManagedSet<String>();
        for (String basePackage : basePackages) {
            for (BeanDefinition candidate : componentProvider.findCandidateComponents(basePackage)) {
                classes.add(candidate.getBeanClassName());
            }
        }

        return classes;
View Full Code Here

Examples of org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents()

            //Scans for all classes annotated with @DbUpdate
            ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(true);
            scanner.addIncludeFilter(new AnnotationTypeFilter(DbUpdate.class));
            List<DbUpdater> updateList = new ArrayList<DbUpdater>();
            for (BeanDefinition bd : scanner.findCandidateComponents("com.sonymobile.backlogtool.dbupdate")) {
                try {
                    DbUpdater updater = (DbUpdater) Class.forName(bd.getBeanClassName()).newInstance();
                    updateList.add(updater);

                } catch (ClassNotFoundException e) {
View Full Code Here

Examples of org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents()

        provider.addIncludeFilter(new AnnotationTypeFilter(ScanImporter.class));

        ClassLoader classLoader = ScannerTypeLoader.class.getClassLoader();
        provider.setResourceLoader(new PathMatchingResourcePatternResolver(classLoader));

        Set<BeanDefinition> candidateComponents = provider.findCandidateComponents("com.denimgroup.threadfix.importer.impl.upload");

        for (BeanDefinition candidateComponent : candidateComponents) {
            candidateComponent.getBeanClassName();
            try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.