java.beans

Class DefaultPersistenceDelegate

public class DefaultPersistenceDelegate extends PersistenceDelegate

DefaultPersistenceDelegate is a {@link PersistenceDelegate} implementation that can be used to serialize objects which adhere to the Java Beans naming convention.

Since: 1.4

Constructor Summary
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.
Method Summary
protected voidinitialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out)
protected Expressioninstantiate(Object oldInstance, Encoder out)
protected booleanmutatesTo(Object oldInstance, Object newInstance)

Constructor Detail

DefaultPersistenceDelegate

public DefaultPersistenceDelegate()
Using this constructor the object to be serialized will be instantiated with the default non-argument constructor.

DefaultPersistenceDelegate

public DefaultPersistenceDelegate(String[] constructorPropertyNames)
This constructor allows to specify which Bean properties appear in the constructor.

The implementation reads the mentioned properties from the Bean instance and applies it in the given order to a corresponding constructor.

Parameters: constructorPropertyNames The properties the Bean's constructor should be given to.

Method Detail

initialize

protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out)

instantiate

protected Expression instantiate(Object oldInstance, Encoder out)

mutatesTo

protected boolean mutatesTo(Object oldInstance, Object newInstance)