java.beans
Class DefaultPersistenceDelegate

java.lang.Object
  extended by java.beans.PersistenceDelegate
      extended by java.beans.DefaultPersistenceDelegate

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.

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  void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out)
           
protected  Expression instantiate(Object oldInstance, Encoder out)
           
protected  boolean mutatesTo(Object oldInstance, Object newInstance)
           
 
Methods inherited from class java.beans.PersistenceDelegate
writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

mutatesTo

protected boolean mutatesTo(Object oldInstance,
                            Object newInstance)
Overrides:
mutatesTo in class PersistenceDelegate

instantiate

protected Expression instantiate(Object oldInstance,
                                 Encoder out)
Specified by:
instantiate in class PersistenceDelegate

initialize

protected void initialize(Class<?> type,
                          Object oldInstance,
                          Object newInstance,
                          Encoder out)
Overrides:
initialize in class PersistenceDelegate