java.beans
public class DefaultPersistenceDelegate extends PersistenceDelegate
DefaultPersistenceDelegate
is a PersistenceDelegate
implementation that can be used to serialize objects which adhere to the
Java Beans naming convention.
Constructor and Description |
---|
DefaultPersistenceDelegate()
Using this constructor the object to be serialized will be instantiated
with the default non-argument constructor.
|
DefaultPersistenceDelegate(String[] constructorPropertyNames)
This constructor allows to specify which Bean properties appear
in the constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
initialize(Class<?> type,
Object oldInstance,
Object newInstance,
Encoder out) |
protected Expression |
instantiate(Object oldInstance,
Encoder out) |
protected boolean |
mutatesTo(Object oldInstance,
Object newInstance) |
writeObject
public DefaultPersistenceDelegate()
public DefaultPersistenceDelegate(String[] constructorPropertyNames)
The implementation reads the mentioned properties from the Bean instance and applies it in the given order to a corresponding constructor.
constructorPropertyNames
- The properties the Bean's constructor
should be given to.protected boolean mutatesTo(Object oldInstance, Object newInstance)
mutatesTo
in class PersistenceDelegate
protected Expression instantiate(Object oldInstance, Encoder out)
instantiate
in class PersistenceDelegate
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out)
initialize
in class PersistenceDelegate