|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The Patchable interface describes an object that can be
monitored for changes using a PatchAdapter.
| Method Summary | |
void |
applyPatch(java.lang.Object copy,
PatchInput s)
Reads a patch from the passed PatchInput object and
applies it to this object. |
void |
createPatch(java.lang.Object copy,
PatchOutput s)
Compares the state of this object with the passed backup copy of its own. |
java.lang.Object |
flatClone()
|
| Methods inherited from interface uka.patch.ReferenceProducer |
descendReferences, filterReferences |
| Method Detail |
public void createPatch(java.lang.Object copy,
PatchOutput s)
throws java.io.IOException
Compares the state of this object with the passed backup
copy of its own. This is done by announcing each pair of
corresponding instance variables of this and the backup copy to
the passed PatchOutput object. If a difference is
detected, the backup copy is updated to the state of this
object.
This method is called by PatchAdapter.createPatch(MarshalStream).
copy - the backup copy of this object.s - the patch output object that is used to compare the
state.
java.io.IOException
public void applyPatch(java.lang.Object copy,
PatchInput s)
throws java.io.IOException,
java.lang.ClassNotFoundException
Reads a patch from the passed PatchInput object and
applies it to this object. This is done by querying the PatchInput.hasDiff() method for each instance variable of
this object. If PatchInput.hasDiff() returns
true, then the new value is read with a method
corresponding to the type of the instance variable (see PatchInput.getDiffAsInt()). The read value is assigned to the
instance variable of this object and the corresponding instance
variable of the backup copy.
This method is called by PatchAdapter.applyPatch(PatchReader).
java.io.IOException
java.lang.ClassNotFoundExceptionpublic java.lang.Object flatClone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||