Class SimpleBeanPropertyFilter.FilterExceptFilter

java.lang.Object
org.codehaus.jackson.map.ser.impl.SimpleBeanPropertyFilter
org.codehaus.jackson.map.ser.impl.SimpleBeanPropertyFilter.FilterExceptFilter
All Implemented Interfaces:
BeanPropertyFilter
Enclosing class:
SimpleBeanPropertyFilter

public static class SimpleBeanPropertyFilter.FilterExceptFilter extends SimpleBeanPropertyFilter
Filter implementation which defaults to filtering out unknown properties and only serializes ones explicitly listed.
  • Field Details

    • _propertiesToInclude

      protected final Set<String> _propertiesToInclude
      Set of property names to serialize.
  • Constructor Details

    • FilterExceptFilter

      public FilterExceptFilter(Set<String> properties)
  • Method Details

    • serializeAsField

      public void serializeAsField(Object bean, JsonGenerator jgen, SerializerProvider provider, BeanPropertyWriter writer) throws Exception
      Description copied from interface: BeanPropertyFilter
      Method called by BeanSerializer to let filter decide what to do with given bean property value: the usual choices are to either filter out (i.e. do nothing) or write using given BeanPropertyWriter, although filters can choose other to do something different altogether.
      Parameters:
      bean - Bean of which property value to serialize
      jgen - Generator use for serializing value
      provider - Provider that can be used for accessing dynamic aspects of serialization processing
      writer - Default bean property serializer to use
      Throws:
      Exception