Package io.micronaut.serde
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 Summary
Modifier and TypeMethodDescriptionboolean
shouldInclude
(Serializer.EncoderContext encoderContext, @NonNull Serializer<Object> propertySerializer, @NonNull Object bean, @NonNull String propertyName, @Nullable Object propertyValue)
-
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 contextpropertySerializer
- the serializer of the propertybean
- the object being serializedpropertyName
- the name of the propertypropertyValue
- the property being serialized- Returns:
- whether the property should be included in serialization
-