Interface CompositeTypeFilter
- All Superinterfaces:
org.springframework.core.type.filter.TypeFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface CompositeTypeFilter
extends org.springframework.core.type.filter.TypeFilter
A Spring
TypeFilter
implementation using the Composite Software Design Pattern to compose multiple
TypeFilters
acting a single instance of TypeFilter
.- Since:
- 2.4.0
- See Also:
-
TypeFilter
- Composite Software Design Pattern
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CompositeTypeFilter
static final CompositeTypeFilter
-
Method Summary
Modifier and TypeMethodDescriptiondefault CompositeTypeFilter
andThen
(org.springframework.core.type.filter.TypeFilter typeFilter) Composes thisTypeFilter
with the givenTypeFilter
using the logical AND operator.static org.springframework.core.type.filter.TypeFilter
composeAnd
(Iterable<org.springframework.core.type.filter.TypeFilter> iterable) Composes theIterable
ofTypeFilters
into a CompositeTypeFilter
that acts as a single instance ofTypeFilter
.static org.springframework.core.type.filter.TypeFilter
composeAnd
(org.springframework.core.type.filter.TypeFilter... array) Composes the array ofTypeFilters
into a CompositeTypeFilter
that acts as a single instance ofTypeFilter
.static org.springframework.core.type.filter.TypeFilter
Composes theIterable
ofTypeFilters
into a CompositeTypeFilter
that acts as a single instance ofTypeFilter
.static org.springframework.core.type.filter.TypeFilter
composeOr
(org.springframework.core.type.filter.TypeFilter... array) Composes the array ofTypeFilters
into a CompositeTypeFilter
that acts as a single instance ofTypeFilter
.default CompositeTypeFilter
negate()
Negates the result of thisTypeFilter's
TypeFilter.match(MetadataReader, MetadataReaderFactory)
operation.static CompositeTypeFilter
of
(org.springframework.core.type.filter.TypeFilter typeFilter) Wraps an existingTypeFilter
in an instance ofCompositeTypeFilter
.default CompositeTypeFilter
orThen
(org.springframework.core.type.filter.TypeFilter typeFilter) Composes thisTypeFilter
with the givenTypeFilter
using the logical OR operator.Methods inherited from interface org.springframework.core.type.filter.TypeFilter
match
-
Field Details
-
ALLOW
-
DENY
-
-
Method Details
-
andThen
@NonNull default CompositeTypeFilter andThen(@NonNull org.springframework.core.type.filter.TypeFilter typeFilter) Composes thisTypeFilter
with the givenTypeFilter
using the logical AND operator.- Parameters:
typeFilter
-TypeFilter
to compose with thisTypeFilter
; must not be null.- Returns:
- a composed
TypeFilter
consisting of thisTypeFilter
and the givenTypeFilter
. - Throws:
IllegalArgumentException
- ifTypeFilter
is null.- See Also:
-
TypeFilter
orThen(TypeFilter)
-
composeAnd
@Nullable static org.springframework.core.type.filter.TypeFilter composeAnd(@Nullable org.springframework.core.type.filter.TypeFilter... array) Composes the array ofTypeFilters
into a CompositeTypeFilter
that acts as a single instance ofTypeFilter
. The CompositeTypeFilter
may be treated as a single instance ofTypeFilter
, too, givenCompositeTypeFilter
extends (i.e. "is a")TypeFilter
.- Parameters:
array
- array ofTypeFilters
to compose.- Returns:
- a Composite
TypeFilter
composed from the array ofTypeFilers
using the logical AND operator; may return null. - See Also:
-
TypeFilter
composeAnd(Iterable)
-
composeAnd
@Nullable static org.springframework.core.type.filter.TypeFilter composeAnd(@Nullable Iterable<org.springframework.core.type.filter.TypeFilter> iterable) Composes theIterable
ofTypeFilters
into a CompositeTypeFilter
that acts as a single instance ofTypeFilter
. The CompositeTypeFilter
may be treated as a single instance ofTypeFilter
, too, givenCompositeTypeFilter
extends (i.e. "is a")TypeFilter
. -
composeOr
@Nullable static org.springframework.core.type.filter.TypeFilter composeOr(@Nullable org.springframework.core.type.filter.TypeFilter... array) Composes the array ofTypeFilters
into a CompositeTypeFilter
that acts as a single instance ofTypeFilter
. The CompositeTypeFilter
may be treated as a single instance ofTypeFilter
, too, givenCompositeTypeFilter
extends (i.e. "is a")TypeFilter
.- Parameters:
array
- array ofTypeFilters
to compose.- Returns:
- a Composite
TypeFilter
composed from the array ofTypeFilers
using the logical OR operator; may return null. - See Also:
-
TypeFilter
composeOr(Iterable)
-
composeOr
@Nullable static org.springframework.core.type.filter.TypeFilter composeOr(@Nullable Iterable<org.springframework.core.type.filter.TypeFilter> iterable) Composes theIterable
ofTypeFilters
into a CompositeTypeFilter
that acts as a single instance ofTypeFilter
. The CompositeTypeFilter
may be treated as a single instance ofTypeFilter
, too, givenCompositeTypeFilter
extends (i.e. "is a")TypeFilter
. -
of
@NonNull static CompositeTypeFilter of(@NonNull org.springframework.core.type.filter.TypeFilter typeFilter) Wraps an existingTypeFilter
in an instance ofCompositeTypeFilter
.- Parameters:
typeFilter
-TypeFilter
to wrap; must not be null.- Returns:
- a
CompositeTypeFilter
wrapping the existingTypeFilter
. - Throws:
IllegalArgumentException
- ifTypeFilter
is null.- See Also:
-
TypeFilter
-
negate
Negates the result of thisTypeFilter's
TypeFilter.match(MetadataReader, MetadataReaderFactory)
operation.- Returns:
- this
TypeFilter
negated. - See Also:
-
orThen
@NonNull default CompositeTypeFilter orThen(@NonNull org.springframework.core.type.filter.TypeFilter typeFilter) Composes thisTypeFilter
with the givenTypeFilter
using the logical OR operator.- Parameters:
typeFilter
-TypeFilter
to compose with thisTypeFilter
; must not be null.- Returns:
- a composed
TypeFilter
consisting of thisTypeFilter
and the givenTypeFilter
. - Throws:
IllegalArgumentException
- ifTypeFilter
is null.- See Also:
-
TypeFilter
andThen(TypeFilter)
-