Class TypeFilterUtils
java.lang.Object
org.springframework.context.annotation.TypeFilterUtils
Collection of utilities for working with
@ComponentScan
type filters.- Since:
- 5.3.13
- Author:
- Chris Beams, Juergen Hoeller, Sam Brannen
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<TypeFilter>
createTypeFiltersFor
(AnnotationAttributes filterAttributes, Environment environment, ResourceLoader resourceLoader, BeanDefinitionRegistry registry) Create type filters from the suppliedAnnotationAttributes
, such as those sourced fromComponentScan.includeFilters()
orComponentScan.excludeFilters()
.
-
Constructor Details
-
TypeFilterUtils
public TypeFilterUtils()
-
-
Method Details
-
createTypeFiltersFor
public static List<TypeFilter> createTypeFiltersFor(AnnotationAttributes filterAttributes, Environment environment, ResourceLoader resourceLoader, BeanDefinitionRegistry registry) Create type filters from the suppliedAnnotationAttributes
, such as those sourced fromComponentScan.includeFilters()
orComponentScan.excludeFilters()
.Each
TypeFilter
will be instantiated using an appropriate constructor, withBeanClassLoaderAware
,BeanFactoryAware
,EnvironmentAware
, andResourceLoaderAware
contracts invoked if they are implemented by the type filter.- Parameters:
filterAttributes
-AnnotationAttributes
for a@Filter
declarationenvironment
- theEnvironment
to make available to filtersresourceLoader
- theResourceLoader
to make available to filtersregistry
- theBeanDefinitionRegistry
to make available to filters as aBeanFactory
if applicable- Returns:
- a list of instantiated and configured type filters
- See Also:
-