Class GemFireComponentClassTypeScanner
java.lang.Object
org.springframework.data.gemfire.config.annotation.support.GemFireComponentClassTypeScanner
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 Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
GemFireComponentClassTypeScanner
(Set<String> basePackages) Constructs an instance of theGemFireComponentClassTypeScanner
initialized with the givenSet
of base packages to scan. -
Method Summary
Modifier and TypeMethodDescriptionFactory method to construct an instance of theGemFireComponentClassTypeScanner
initialized with the givenIterable
of base packages to scan.Factory method to construct an instance of theGemFireComponentClassTypeScanner
initialized with the given array of base packages to scan.protected org.springframework.context.ConfigurableApplicationContext
Returns a reference to the SpringApplicationContext
.Returns an unmodifiableSet
of base packages to scan for GemFire components.protected ClassLoader
Returns a reference to theClassLoader
used to find and load GemFire application persistent entity classes.protected org.springframework.core.env.Environment
Returns a reference to the SpringEnvironment
in which the Spring GemFire application is running.protected Iterable<org.springframework.core.type.filter.TypeFilter>
Returns a collection ofTypeFilters
used to exclude types found during the classpath component scan.protected Iterable<org.springframework.core.type.filter.TypeFilter>
Returns a collection ofTypeFilters
used to include (match) types found during the classpath component scan.iterator()
protected org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider
Constructs a new instance of theClassPathScanningCandidateComponentProvider
initialized with no default filters.protected org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider
newClassPathScanningCandidateComponentProvider
(boolean useDefaultFilters) Constructs a new instance of theClassPathScanningCandidateComponentProvider
initialized with theuseDefaultFilters
boolean value to indicate whether to use default values or not.scan()
Scans theSet
of base packages searching for GemFire application components accepted by the filters of this scanner.with
(ClassLoader entityClassLoader) with
(org.springframework.context.ConfigurableApplicationContext applicationContext) withExcludes
(Iterable<org.springframework.core.type.filter.TypeFilter> excludes) withExcludes
(org.springframework.core.type.filter.TypeFilter... excludes) withIncludes
(Iterable<org.springframework.core.type.filter.TypeFilter> includes) withIncludes
(org.springframework.core.type.filter.TypeFilter... includes) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
logger
protected final org.slf4j.Logger logger
-
-
Constructor Details
-
GemFireComponentClassTypeScanner
Constructs an instance of theGemFireComponentClassTypeScanner
initialized with the givenSet
of base packages to scan.- Parameters:
basePackages
-Set
of base packages to scan for GemFire component clases.- Throws:
IllegalArgumentException
- if theSet
is null or empty.- See Also:
-
-
Method Details
-
from
Factory method to construct an instance of theGemFireComponentClassTypeScanner
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
Factory method to construct an instance of theGemFireComponentClassTypeScanner
initialized with the givenIterable
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 theIterable
of base packages is null or empty.- See Also:
-
getApplicationContext
protected org.springframework.context.ConfigurableApplicationContext getApplicationContext()Returns a reference to the SpringApplicationContext
.- Returns:
- a reference to the Spring
ApplicationContext
. - See Also:
-
ConfigurableApplicationContext
-
getBasePackages
Returns an unmodifiableSet
of base packages to scan for GemFire components. -
getEntityClassLoader
Returns a reference to theClassLoader
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:
-
ConfigurableBeanFactory.getBeanClassLoader()
Thread.getContextClassLoader()
ClassLoader
getApplicationContext()
-
getEnvironment
protected org.springframework.core.env.Environment getEnvironment()Returns a reference to the SpringEnvironment
in which the Spring GemFire application is running.- Returns:
- a reference to the Spring
Environment
. - See Also:
-
EnvironmentCapable.getEnvironment()
Environment
StandardEnvironment
getApplicationContext()
-
getExcludes
Returns a collection ofTypeFilters
used to exclude types found during the classpath component scan.- Returns:
- a collection of
TypeFilter
objects - See Also:
-
TypeFilter
Iterable
-
getIncludes
Returns a collection ofTypeFilters
used to include (match) types found during the classpath component scan.- Returns:
- a collection of
TypeFilter
objects - See Also:
-
TypeFilter
Iterable
-
iterator
-
scan
Scans theSet
of base packages searching for GemFire application components accepted by the filters of this scanner. -
newClassPathScanningCandidateComponentProvider
protected org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider newClassPathScanningCandidateComponentProvider()Constructs a new instance of theClassPathScanningCandidateComponentProvider
initialized with no default filters.- Returns:
- a new instance of the
ClassPathScanningCandidateComponentProvider
. - See Also:
-
ClassPathScanningCandidateComponentProvider
newClassPathScanningCandidateComponentProvider(boolean)
-
newClassPathScanningCandidateComponentProvider
protected org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider newClassPathScanningCandidateComponentProvider(boolean useDefaultFilters) Constructs a new instance of theClassPathScanningCandidateComponentProvider
initialized with theuseDefaultFilters
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:
-
ClassPathScanningCandidateComponentProvider
newClassPathScanningCandidateComponentProvider(boolean)
-
with
-
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)
-