java.beans

Class PersistenceDelegate

public abstract class PersistenceDelegate extends Object

A PersistenceDelegate describes how a another object has to constructed and transformed in order to create a complete replicate.

For custom classes you will need to implement PersistenceDelegate in a way that is suitable for them. To make use of the implementation you have to register it with an {@link Encoder} using the {Encoder#setPersistenceDelegate} method.

Since: 1.4

Method Summary
protected voidinitialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out)
protected abstract Expressioninstantiate(Object oldInstance, Encoder out)
protected booleanmutatesTo(Object oldInstance, Object newInstance)
voidwriteObject(Object oldInstance, Encoder out)

Method Detail

initialize

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

instantiate

protected abstract Expression instantiate(Object oldInstance, Encoder out)

mutatesTo

protected boolean mutatesTo(Object oldInstance, Object newInstance)

writeObject

public void writeObject(Object oldInstance, Encoder out)