T
- The bean type.public class BeanInterceptor<T> extends Object
Bean interceptors intercept calls to bean getters and setters to allow them to override values in transit.
Bean interceptors are registered in the following way:
Modifier and Type | Class and Description |
---|---|
static class |
BeanInterceptor.Default
Default interceptor
|
Modifier and Type | Field and Description |
---|---|
static BeanInterceptor<Object> |
DEFAULT
Default reusable property filter instance.
|
Constructor and Description |
---|
BeanInterceptor() |
Modifier and Type | Method and Description |
---|---|
Object |
readProperty(T bean,
String name,
Object value)
Property read interceptor.
|
Object |
writeProperty(T bean,
String name,
Object value)
Property write interceptor.
|
public static final BeanInterceptor<Object> DEFAULT
public BeanInterceptor()
public Object readProperty(T 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(T 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–2020 The Apache Software Foundation. All rights reserved.