buoy.xml.delegate

Class 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.

Author:
Peter Eastman

Constructor Summary

StaticFieldDelegate(Class cls)
Create a StaticFieldDelegate.

Constructor Details

StaticFieldDelegate

public StaticFieldDelegate(Class cls)
Create a StaticFieldDelegate.
Parameters:
cls - the class which should be searched for the field

Written by Peter Eastman.