ComponentScanFilter class
Represents a filter definition for component scanning.
ComponentScanFilter provides fine-grained control over which
classes should be included or excluded during the scanning process.
Filter Types
FilterType.ANNOTATION→ Matches classes annotated with specific annotations.FilterType.ASSIGNABLE→ Matches classes assignable to given types.FilterType.REGEX→ Matches classes based on regex patterns.FilterType.CUSTOM→ Uses a custom`TypeFilter`implementation.
Usage
const myFilter = ComponentScanFilter(
type: FilterType.ANNOTATION,
classes: [MyCustomAnnotation],
);
Notes
- Multiple filters can be combined in
includeFiltersandexcludeFilters. - For complex logic, use
FilterType.CUSTOMwith a customTypeFilter.
- Mixed-in types
Constructors
-
ComponentScanFilter(FilterType type, {List<
ClassType< classes = const [], String? pattern, TypeFilter? typeFilter})Object> > -
Represents a filter definition for component scanning.
const
Properties
-
classes
→ List<
ClassType< Object> > -
Classes associated with the filter.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- pattern → String?
-
Optional regex pattern for matching class names.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → FilterType
-
The type of filter to apply during scanning.
final
- typeFilter → TypeFilter?
-
Custom filter implementation when
FilterType.CUSTOMis used.final
Methods
-
equalizedProperties(
) → List< Object?> -
Mixin-style contract for value-based equality,
hashCode, andtoString.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited