Examples of AnnotationTypeFilter


Examples of org.mule.util.scan.annotations.AnnotationTypeFilter

                        }
                    }
                }
                if (filter == null)
                {
                    filter = new AnnotationTypeFilter(annotationClass);
                }
                return new AnnotationsScanner(filter);
            }
            else
            {
View Full Code Here

Examples of org.mule.util.scan.annotations.AnnotationTypeFilter

                        }
                    }
                }
                if (filter == null)
                {
                    filter = new AnnotationTypeFilter(annotationClass);
                }
                return new AnnotationsScanner(filter);
            }
            else
            {
View Full Code Here

Examples of org.springframework.core.type.filter.AnnotationTypeFilter

    }

    @SuppressWarnings("unchecked")
    private <T> void collect(Set<Class<T>>candidates, Class<?> clazz, String pkg) throws ClassNotFoundException {
      scanner.resetFilters(false);
        scanner.addIncludeFilter(clazz.isAnnotation() new AnnotationTypeFilter((Class<? extends Annotation>) clazz) : new AssignableTypeFilter(clazz));
        if (logger.isInfoEnabled()) logger.info("Scanning classpath [" + pkg + "] looking for " + (clazz.isAnnotation() ? "@" + clazz.getSimpleName() + " annotated" : clazz.getSimpleName()) + " domain entities");
        Set<BeanDefinition> definitions = scanner.findCandidateComponents(pkg);
        for (BeanDefinition def : definitions) {
          if (logger.isDebugEnabled()) logger.debug("Found matching class [" + def.getBeanClassName() + "]");
            candidates.add(ClassUtils.forName(def.getBeanClassName()));
View Full Code Here

Examples of org.springframework.core.type.filter.AnnotationTypeFilter

        case ANNOTATION:
          Assert.isAssignable(Annotation.class, filterClass, "An error occured when processing a @ComponentScan "
              + "ANNOTATION type filter: ");
          @SuppressWarnings("unchecked")
          Class<Annotation> annoClass = (Class<Annotation>) filterClass;
          typeFilters.add(new AnnotationTypeFilter(annoClass));
          break;
        case ASSIGNABLE_TYPE:
          typeFilters.add(new AssignableTypeFilter(filterClass));
          break;
        case CUSTOM:
View Full Code Here

Examples of org.springframework.core.type.filter.AnnotationTypeFilter

      for (TypeFilter filter : includeFilters) {
        addIncludeFilter(filter);
      }
    } else {
      super.addIncludeFilter(new InterfaceTypeFilter(Repository.class));
      super.addIncludeFilter(new AnnotationTypeFilter(RepositoryDefinition.class, true, true));
    }

    addExcludeFilter(new AnnotationTypeFilter(NoRepositoryBean.class));
  }
View Full Code Here

Examples of org.springframework.core.type.filter.AnnotationTypeFilter

    super.addIncludeFilter(new AllTypeFilter(filterPlusInterface));

    List<TypeFilter> filterPlusAnnotation = new ArrayList<TypeFilter>(2);
    filterPlusAnnotation.add(includeFilter);
    filterPlusAnnotation.add(new AnnotationTypeFilter(RepositoryDefinition.class, true, true));

    super.addIncludeFilter(new AllTypeFilter(filterPlusAnnotation));
  }
View Full Code Here

Examples of org.springframework.core.type.filter.AnnotationTypeFilter

  public Set<Class<?>> findTypes(Iterable<String> basePackages) {

    ClassPathScanningCandidateComponentProvider provider = new InterfaceAwareScanner(considerInterfaces);

    for (Class<? extends Annotation> annotationType : annotationTypess) {
      provider.addIncludeFilter(new AnnotationTypeFilter(annotationType, true, considerInterfaces));
    }

    Set<Class<?>> types = new HashSet<Class<?>>();

    for (String basePackage : basePackages) {
View Full Code Here

Examples of org.springframework.core.type.filter.AnnotationTypeFilter

    String basePackage = getMappingBasePackage();
    Set<Class<?>> initialEntitySet = new HashSet<Class<?>>();

    if (StringUtils.hasText(basePackage)) {
      ClassPathScanningCandidateComponentProvider componentProvider = new ClassPathScanningCandidateComponentProvider(false);
      componentProvider.addIncludeFilter(new AnnotationTypeFilter(Document.class));
      componentProvider.addIncludeFilter(new AnnotationTypeFilter(Persistent.class));
      for (BeanDefinition candidate : componentProvider.findCandidateComponents(basePackage)) {
        initialEntitySet.add(ClassUtils.forName(candidate.getBeanClassName(), AbstractCouchbaseConfiguration.class.getClassLoader()));
      }
    }
View Full Code Here

Examples of org.springframework.core.type.filter.AnnotationTypeFilter

        protected void registerDefaultFilters() {
            boolean acceptAllInterfaces = true;

            // if specified, use the given annotation and / or marker interface
            if (MapperScannerConfigurer.this.annotationClass != null) {
                addIncludeFilter(new AnnotationTypeFilter(MapperScannerConfigurer.this.annotationClass));
                acceptAllInterfaces = false;
            }

            // override AssignableTypeFilter to ignore matches on the actual marker interface
            if (MapperScannerConfigurer.this.markerInterface != null) {
View Full Code Here

Examples of org.springframework.core.type.filter.AnnotationTypeFilter

  public void registerFilters() {
    boolean acceptAllInterfaces = true;

    // if specified, use the given annotation and / or marker interface
    if (this.annotationClass != null) {
      addIncludeFilter(new AnnotationTypeFilter(this.annotationClass));
      acceptAllInterfaces = false;
    }

    // override AssignableTypeFilter to ignore matches on the actual marker interface
    if (this.markerInterface != null) {
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.