public class PropertyFilter extends Object
Registers a bean property filter with a bean class.
Property filters can be used to intercept calls to getters and setters and alter their values in transit.
Property filters are registered in the following ways:
Modifier and Type | Field and Description |
---|---|
static PropertyFilter |
DEFAULT
Default reusable property filter instance.
|
Constructor and Description |
---|
PropertyFilter() |
Modifier and Type | Method and Description |
---|---|
Object |
readProperty(Object bean,
String name,
Object value)
Property read interceptor.
|
Object |
writeProperty(Object bean,
String name,
Object value)
Property write interceptor.
|
public static final PropertyFilter DEFAULT
public PropertyFilter()
public Object readProperty(Object bean, String name, Object value)
Subclasses can override this property to convert property values to some other object just before serialization.
bean
- The bean from which the property was read.name
- The property name.value
- The value just extracted from calling the bean getter.public Object writeProperty(Object bean, String name, Object value)
Subclasses can override this property to convert property values to some other object just before calling the bean setter.
bean
- The bean from which the property was read.name
- The property name.value
- The value just parsed.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.