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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final CompositeTypeFilter
     
    static final CompositeTypeFilter
     
  • Method Summary

    Modifier and Type
    Method
    Description
    andThen(org.springframework.core.type.filter.TypeFilter typeFilter)
    Composes this TypeFilter with the given TypeFilter using the logical AND operator.
    static org.springframework.core.type.filter.TypeFilter
    composeAnd(Iterable<org.springframework.core.type.filter.TypeFilter> iterable)
    Composes the Iterable of TypeFilters into a Composite TypeFilter that acts as a single instance of TypeFilter.
    static org.springframework.core.type.filter.TypeFilter
    composeAnd(org.springframework.core.type.filter.TypeFilter... array)
    Composes the array of TypeFilters into a Composite TypeFilter that acts as a single instance of TypeFilter.
    static org.springframework.core.type.filter.TypeFilter
    composeOr(Iterable<org.springframework.core.type.filter.TypeFilter> iterable)
    Composes the Iterable of TypeFilters into a Composite TypeFilter that acts as a single instance of TypeFilter.
    static org.springframework.core.type.filter.TypeFilter
    composeOr(org.springframework.core.type.filter.TypeFilter... array)
    Composes the array of TypeFilters into a Composite TypeFilter that acts as a single instance of TypeFilter.
    Negates the result of this TypeFilter's TypeFilter.match(MetadataReader, MetadataReaderFactory) operation.
    of(org.springframework.core.type.filter.TypeFilter typeFilter)
    Wraps an existing TypeFilter in an instance of CompositeTypeFilter.
    orThen(org.springframework.core.type.filter.TypeFilter typeFilter)
    Composes this TypeFilter with the given TypeFilter using the logical OR operator.

    Methods inherited from interface org.springframework.core.type.filter.TypeFilter

    match
  • Field Details

  • Method Details

    • andThen

      @NonNull default CompositeTypeFilter andThen(@NonNull org.springframework.core.type.filter.TypeFilter typeFilter)
      Composes this TypeFilter with the given TypeFilter using the logical AND operator.
      Parameters:
      typeFilter - TypeFilter to compose with this TypeFilter; must not be null.
      Returns:
      a composed TypeFilter consisting of this TypeFilter and the given TypeFilter.
      Throws:
      IllegalArgumentException - if TypeFilter is null.
      See Also:
    • composeAnd

      @Nullable static org.springframework.core.type.filter.TypeFilter composeAnd(@Nullable org.springframework.core.type.filter.TypeFilter... array)
      Composes the array of TypeFilters into a Composite TypeFilter that acts as a single instance of TypeFilter. The Composite TypeFilter may be treated as a single instance of TypeFilter, too, given CompositeTypeFilter extends (i.e. "is a") TypeFilter.
      Parameters:
      array - array of TypeFilters to compose.
      Returns:
      a Composite TypeFilter composed from the array of TypeFilers using the logical AND operator; may return null.
      See Also:
    • composeAnd

      @Nullable static org.springframework.core.type.filter.TypeFilter composeAnd(@Nullable Iterable<org.springframework.core.type.filter.TypeFilter> iterable)
      Composes the Iterable of TypeFilters into a Composite TypeFilter that acts as a single instance of TypeFilter. The Composite TypeFilter may be treated as a single instance of TypeFilter, too, given CompositeTypeFilter extends (i.e. "is a") TypeFilter.
      Parameters:
      iterable - Iterable of TypeFilters to compose.
      Returns:
      a Composite TypeFilter composed from the Iterable of TypeFilers using the logical AND operator; may return null.
      See Also:
    • composeOr

      @Nullable static org.springframework.core.type.filter.TypeFilter composeOr(@Nullable org.springframework.core.type.filter.TypeFilter... array)
      Composes the array of TypeFilters into a Composite TypeFilter that acts as a single instance of TypeFilter. The Composite TypeFilter may be treated as a single instance of TypeFilter, too, given CompositeTypeFilter extends (i.e. "is a") TypeFilter.
      Parameters:
      array - array of TypeFilters to compose.
      Returns:
      a Composite TypeFilter composed from the array of TypeFilers using the logical OR operator; may return null.
      See Also:
    • composeOr

      @Nullable static org.springframework.core.type.filter.TypeFilter composeOr(@Nullable Iterable<org.springframework.core.type.filter.TypeFilter> iterable)
      Composes the Iterable of TypeFilters into a Composite TypeFilter that acts as a single instance of TypeFilter. The Composite TypeFilter may be treated as a single instance of TypeFilter, too, given CompositeTypeFilter extends (i.e. "is a") TypeFilter.
      Parameters:
      iterable - Iterable of TypeFilters to compose.
      Returns:
      a Composite TypeFilter composed from the Iterable of TypeFilers using the logical OR operator; may return null.
      See Also:
    • of

      @NonNull static CompositeTypeFilter of(@NonNull org.springframework.core.type.filter.TypeFilter typeFilter)
      Wraps an existing TypeFilter in an instance of CompositeTypeFilter.
      Parameters:
      typeFilter - TypeFilter to wrap; must not be null.
      Returns:
      a CompositeTypeFilter wrapping the existing TypeFilter.
      Throws:
      IllegalArgumentException - if TypeFilter is null.
      See Also:
      • TypeFilter
    • negate

      @NonNull default CompositeTypeFilter negate()
      Negates the result of this TypeFilter'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 this TypeFilter with the given TypeFilter using the logical OR operator.
      Parameters:
      typeFilter - TypeFilter to compose with this TypeFilter; must not be null.
      Returns:
      a composed TypeFilter consisting of this TypeFilter and the given TypeFilter.
      Throws:
      IllegalArgumentException - if TypeFilter is null.
      See Also: