Interface PropertyFilter


@Indexed(PropertyFilter.class) public interface PropertyFilter
Models a build time property filter. That is a class computed at build-time that can be used to decide which bean properties to serialize. Use Named annotation to specify a name for the property filter.
Author:
Andriy Dmytruk
  • Method Details

    • shouldInclude

      boolean shouldInclude(@NonNull Serializer.EncoderContext encoderContext, @NonNull @NonNull Serializer<Object> propertySerializer, @NonNull @NonNull Object bean, @NonNull @NonNull String propertyName, @Nullable @Nullable Object propertyValue)
      Parameters:
      encoderContext - the encoder context
      propertySerializer - the serializer of the property
      bean - the object being serialized
      propertyName - the name of the property
      propertyValue - the property being serialized
      Returns:
      whether the property should be included in serialization