com.fasterxml.jackson.databind.ser

## Class FilterProvider

- java.lang.Object
- - com.fasterxml.jackson.databind.ser.FilterProvider

- Direct Known Subclasses:
    SimpleFilterProvider

      public abstract class FilterProvider
      extends java.lang.Object

  Interface for objects that providers instances of `PropertyFilter` that match given ids. A provider is configured to be used during serialization, to find filter to used based on id specified by `JsonFilter` annotation on bean class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterProvider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract BeanPropertyFilter` | `findFilter(java.lang.Object filterId)` Deprecated. Since 2.3 deprecated because `BeanPropertyFilter` is deprecated;
    `PropertyFilter` | `findPropertyFilter(java.lang.Object filterId, java.lang.Object valueToFilter)` Lookup method used to find `PropertyFilter` that has specified id.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FilterProvider

          public FilterProvider()

  - ### Method Detail

    - #### findFilter

          @Deprecated
          public abstract BeanPropertyFilter findFilter(java.lang.Object filterId)

      Deprecated. Since 2.3 deprecated because `BeanPropertyFilter` is deprecated;
      Lookup method used to find `BeanPropertyFilter` that has specified id. Note that id is typically a `String`, but is not necessarily limited to that; that is, while standard components use String, custom implementation can choose other kinds of keys.
      Returns:
        Filter registered with specified id, if one defined; null if none found.

    - #### findPropertyFilter

          public PropertyFilter findPropertyFilter(java.lang.Object filterId,
                                          java.lang.Object valueToFilter)

      Lookup method used to find `PropertyFilter` that has specified id. Note that id is typically a `String`, but is not necessarily limited to that; that is, while standard components use String, custom implementation can choose other kinds of keys.

      This method is the replacement for `findFilter(java.lang.Object)` starting with 2.3.

      Note that the default implementation is designed to support short-term backwards compatibility, and will call the deprecated `findFilter` method, then wrap filter if one found as `PropertyFilter`. It should be overridden by up-to-date implementations

      Parameters:
        `filterId` - Id of the filter to fetch
        `valueToFilter` - Object being filtered (usually POJO, but may be a `Map`, or in future a container), if available; not available when generating schemas.
      Returns:
        Filter to use, if any.
      Since:
        2.3