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:
-
ComponentScan.FilterTypeFilter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<org.springframework.core.type.filter.TypeFilter>createTypeFiltersFor(org.springframework.core.annotation.AnnotationAttributes filterAttributes, org.springframework.core.env.Environment environment, org.springframework.core.io.ResourceLoader resourceLoader, org.springframework.beans.factory.support.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<org.springframework.core.type.filter.TypeFilter> createTypeFiltersFor(org.springframework.core.annotation.AnnotationAttributes filterAttributes, org.springframework.core.env.Environment environment, org.springframework.core.io.ResourceLoader resourceLoader, org.springframework.beans.factory.support.BeanDefinitionRegistry registry) Create type filters from the suppliedAnnotationAttributes, such as those sourced fromComponentScan.includeFilters()orComponentScan.excludeFilters().Each
TypeFilterwill be instantiated using an appropriate constructor, withBeanClassLoaderAware,BeanFactoryAware,EnvironmentAware, andResourceLoaderAwarecontracts invoked if they are implemented by the type filter.- Parameters:
filterAttributes-AnnotationAttributesfor a@Filterdeclarationenvironment- theEnvironmentto make available to filtersresourceLoader- theResourceLoaderto make available to filtersregistry- theBeanDefinitionRegistryto make available to filters as aBeanFactoryif applicable- Returns:
- a list of instantiated and configured type filters
- See Also:
-
TypeFilterAnnotationTypeFilterAssignableTypeFilterAspectJTypeFilterRegexPatternTypeFilterBeanClassLoaderAwareBeanFactoryAwareEnvironmentAwareResourceLoaderAware
-