|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.openbeans.PersistenceDelegate
public abstract class PersistenceDelegate
PersistenceDelegate instances write received bean objects to encoders in the form of expressions and statements, which can be evaluated or
executed to reconstruct the recorded bean objects in a new environment during decoding. Expressions are usually used to instantiate bean objects in the new
environment, and statements are used to initialize their properties if necessary. As a result, the reconstructed bean objects become equivalent to the
original recorded ones in terms of their public states.
| Constructor Summary | |
|---|---|
PersistenceDelegate()
Default constructor. |
|
| Method Summary | |
|---|---|
protected void |
initialize(Class<?> type,
Object oldInstance,
Object newInstance,
Encoder enc)
Produces a series of expressions and statements for the initialization of a bean object's properties. |
protected abstract Expression |
instantiate(Object oldInstance,
Encoder enc)
Constructs an expression for instantiating an object of the same type as the old instance. |
protected boolean |
mutatesTo(Object o1,
Object o2)
Determines whether one object mutates to the other object. |
void |
writeObject(Object oldInstance,
Encoder out)
Writes a bean object to the given encoder. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistenceDelegate()
| Method Detail |
|---|
protected void initialize(Class<?> type,
Object oldInstance,
Object newInstance,
Encoder enc)
PersisteneceDelegate instance.
type - the type of the beanoldInstance - the original bean object to be recordednewInstance - the simmulating new bean object to be initializedenc - the encoder to write the outputs to
protected abstract Expression instantiate(Object oldInstance,
Encoder enc)
oldInstance - the old instanceenc - the encoder that wants to record the old instance
protected boolean mutatesTo(Object o1,
Object o2)
o1 - one objecto2 - the other object
public void writeObject(Object oldInstance,
Encoder out)
oldInstance - the old instance to be writtenout - the encoder that the old instance will be written to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||