buoy.xml.delegate
Class StaticFieldDelegate
PersistenceDelegate
buoy.xml.delegate.StaticFieldDelegate
public class StaticFieldDelegate
extends PersistenceDelegate
This class is a PersistenceDelegate for serializing the values of static fields of classes. It is
used when a class defines various constants, and the appropriate way to "instantiate" one of them
is to get it from the appropriate static field.
The constructor to this class simply takes the Class object which owns the static field. When
it is asked to serialize an object, it searches the class for a public static final field whose value
is the object in question, then records a reference to that field.
StaticFieldDelegate
public StaticFieldDelegate(Class cls)
Create a StaticFieldDelegate.
cls
- the class which should be searched for the field
Written by Peter Eastman.