Class GemFireComponentClassTypeScanner

java.lang.Object
org.springframework.data.gemfire.config.annotation.support.GemFireComponentClassTypeScanner
All Implemented Interfaces:
Iterable<String>

public class GemFireComponentClassTypeScanner extends Object implements Iterable<String>
The GemFireComponentClassTypeScanner class is a classpath component scanner used to search for GemFire components based on Class type.
Since:
1.9.0
See Also:
  • Iterable
  • ConfigurableApplicationContext
  • ClassPathScanningCandidateComponentProvider
  • Environment
  • TypeFilter
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
  • Constructor Details

    • GemFireComponentClassTypeScanner

      protected GemFireComponentClassTypeScanner(Set<String> basePackages)
      Constructs an instance of the GemFireComponentClassTypeScanner initialized with the given Set of base packages to scan.
      Parameters:
      basePackages - Set of base packages to scan for GemFire component clases.
      Throws:
      IllegalArgumentException - if the Set is null or empty.
      See Also:
  • Method Details

    • from

      public static GemFireComponentClassTypeScanner from(String... basePackages)
      Factory method to construct an instance of the GemFireComponentClassTypeScanner initialized with the given array of base packages to scan.
      Parameters:
      basePackages - array of base packages to scan for GemFire components.
      Returns:
      an initialized instance of GemFireComponentClassTypeScanner.
      Throws:
      IllegalArgumentException - if the array of base packages is null or empty.
      See Also:
    • from

      public static GemFireComponentClassTypeScanner from(Iterable<String> basePackages)
      Factory method to construct an instance of the GemFireComponentClassTypeScanner initialized with the given Iterable of base packages to scan.
      Parameters:
      basePackages - Iterable of base packages to scan for GemFire components.
      Returns:
      an initialized instance of GemFireComponentClassTypeScanner.
      Throws:
      IllegalArgumentException - if the Iterable of base packages is null or empty.
      See Also:
    • getApplicationContext

      protected org.springframework.context.ConfigurableApplicationContext getApplicationContext()
      Returns a reference to the Spring ApplicationContext.
      Returns:
      a reference to the Spring ApplicationContext.
      See Also:
      • ConfigurableApplicationContext
    • getBasePackages

      protected Set<String> getBasePackages()
      Returns an unmodifiable Set of base packages to scan for GemFire components.
      Returns:
      an unmodifiable Set of base packages to scan for GemFire components.
      See Also:
    • getEntityClassLoader

      protected ClassLoader getEntityClassLoader()
      Returns a reference to the ClassLoader used to find and load GemFire application persistent entity classes.
      Returns:
      the ClassLoader used to find and load GemFire application persistent entity classes.
      See Also:
    • getEnvironment

      protected org.springframework.core.env.Environment getEnvironment()
      Returns a reference to the Spring Environment in which the Spring GemFire application is running.
      Returns:
      a reference to the Spring Environment.
      See Also:
    • getExcludes

      protected Iterable<org.springframework.core.type.filter.TypeFilter> getExcludes()
      Returns a collection of TypeFilters used to exclude types found during the classpath component scan.
      Returns:
      a collection of TypeFilter objects
      See Also:
    • getIncludes

      protected Iterable<org.springframework.core.type.filter.TypeFilter> getIncludes()
      Returns a collection of TypeFilters used to include (match) types found during the classpath component scan.
      Returns:
      a collection of TypeFilter objects
      See Also:
    • iterator

      public Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
    • scan

      public Set<Class<?>> scan()
      Scans the Set of base packages searching for GemFire application components accepted by the filters of this scanner.
      Returns:
      a Set of GemFire application component Class types found on the classpath.
      See Also:
    • newClassPathScanningCandidateComponentProvider

      protected org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider newClassPathScanningCandidateComponentProvider()
      Constructs a new instance of the ClassPathScanningCandidateComponentProvider initialized with no default filters.
      Returns:
      a new instance of the ClassPathScanningCandidateComponentProvider.
      See Also:
    • newClassPathScanningCandidateComponentProvider

      protected org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider newClassPathScanningCandidateComponentProvider(boolean useDefaultFilters)
      Constructs a new instance of the ClassPathScanningCandidateComponentProvider initialized with the useDefaultFilters boolean value to indicate whether to use default values or not. Additionally, the exclude/include filters are also set.
      Parameters:
      useDefaultFilters - boolean value to indicate whether to use default filters.
      Returns:
      a new instance of the ClassPathScanningCandidateComponentProvider.
      See Also:
    • with

      public GemFireComponentClassTypeScanner with(ClassLoader entityClassLoader)
    • with

      public GemFireComponentClassTypeScanner with(org.springframework.context.ConfigurableApplicationContext applicationContext)
    • withExcludes

      public GemFireComponentClassTypeScanner withExcludes(org.springframework.core.type.filter.TypeFilter... excludes)
    • withExcludes

      public GemFireComponentClassTypeScanner withExcludes(Iterable<org.springframework.core.type.filter.TypeFilter> excludes)
    • withIncludes

      public GemFireComponentClassTypeScanner withIncludes(org.springframework.core.type.filter.TypeFilter... includes)
    • withIncludes

      public GemFireComponentClassTypeScanner withIncludes(Iterable<org.springframework.core.type.filter.TypeFilter> includes)