Class TypeFilterUtils

java.lang.Object
org.springframework.context.annotation.TypeFilterUtils

public abstract class TypeFilterUtils extends Object
Collection of utilities for working with @ComponentScan type filters.
Since:
5.3.13
Author:
Chris Beams, Juergen Hoeller, Sam Brannen
See Also:
  • 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 supplied AnnotationAttributes, such as those sourced from ComponentScan.includeFilters() or ComponentScan.excludeFilters().

      Each TypeFilter will be instantiated using an appropriate constructor, with BeanClassLoaderAware, BeanFactoryAware, EnvironmentAware, and ResourceLoaderAware contracts invoked if they are implemented by the type filter.

      Parameters:
      filterAttributes - AnnotationAttributes for a @Filter declaration
      environment - the Environment to make available to filters
      resourceLoader - the ResourceLoader to make available to filters
      registry - the BeanDefinitionRegistry to make available to filters as a BeanFactory if applicable
      Returns:
      a list of instantiated and configured type filters
      See Also: