Annotation Interface ComponentScan.Filter
- Enclosing class:
- ComponentScan
Declares the type filter to be used as an include filter or exclude filter.
-
Element Details
-
type
FilterType typeThe type of filter to use.Default is
FilterType.ANNOTATION
.- Default:
- ANNOTATION
-
value
Alias forclasses()
.- See Also:
- Default:
- {}
-
classes
The class or classes to use as the filter.The following table explains how the classes will be interpreted based on the configured value of the
type()
attribute.FilterType
Class Interpreted As ANNOTATION
the annotation itself ASSIGNABLE_TYPE
the type that detected components should be assignable to CUSTOM
an implementation of TypeFilter
When multiple classes are specified, OR logic is applied — for example, "include types annotated with
@Foo
OR@Bar
".Custom
TypeFilters
may optionally implement any of the followingAware
interfaces, and their respective methods will be called prior tomatch
:Specifying zero classes is permitted but will have no effect on component scanning.
- Default:
- {}
-
pattern
String[] patternThe pattern (or patterns) to use for the filter, as an alternative to specifying a Classvalue()
.If
type()
is set toASPECTJ
, this is an AspectJ type pattern expression. Iftype()
is set toREGEX
, this is a regex pattern for the fully-qualified class names to match.- Default:
- {}
-