Class AnnotatedTypeScanner

java.lang.Object
org.springframework.data.util.AnnotatedTypeScanner
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.EnvironmentAware, org.springframework.context.ResourceLoaderAware

public class AnnotatedTypeScanner extends Object implements org.springframework.context.ResourceLoaderAware, org.springframework.context.EnvironmentAware
Scanner to find types with annotations on the classpath.
Author:
Oliver Gierke, Christoph Strobl, Johannes Englmeier
  • Constructor Details

    • AnnotatedTypeScanner

      @SafeVarargs public AnnotatedTypeScanner(Class<? extends Annotation>... annotationTypes)
      Creates a new AnnotatedTypeScanner for the given annotation types.
      Parameters:
      annotationTypes - the annotation types to scan for.
    • AnnotatedTypeScanner

      @SafeVarargs public AnnotatedTypeScanner(boolean considerInterfaces, Class<? extends Annotation>... annotationTypes)
      Creates a new AnnotatedTypeScanner for the given annotation types.
      Parameters:
      considerInterfaces - whether to consider interfaces as well.
      annotationTypes - the annotations to scan for.
    • AnnotatedTypeScanner

      public AnnotatedTypeScanner(boolean considerInterfaces, Collection<Class<? extends Annotation>> annotationTypes)
      Parameters:
      considerInterfaces -
      annotationTypes -
      Since:
      3.0
  • Method Details

    • setResourceLoader

      public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
      Specified by:
      setResourceLoader in interface org.springframework.context.ResourceLoaderAware
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
    • findTypes

      public Set<Class<?>> findTypes(String... basePackages)
    • findTypes

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