| java.lang.Object uk.org.ponder.reflect.FieldHash
FieldHash | public class FieldHash (Code) | | Automates the process of reflecting a value type full of Strings to and from
a Map of Strings. Useful for HTTP requests and the like. Old-fashioned code,
shortly to be destroyed.
author: Antranig Basman (antranig@caret.cam.ac.uk) |
Method Summary | |
public void | addField(String fieldname) | public void | fromMap(Map from, Object targetobj) Select those fields from the supplied map which match keys stored in
this fieldhash, and set them in the supplied target object. | public StringList[] | fromObj(Object targetobj) Returns a 2-element array of StringLists, the first holding key names,
the second holding values. |
fromMap | public void fromMap(Map from, Object targetobj)(Code) | | Select those fields from the supplied map which match keys stored in
this fieldhash, and set them in the supplied target object. Can deal with
either String[]-valued parameters or String-valued ones.
|
fromObj | public StringList[] fromObj(Object targetobj)(Code) | | Returns a 2-element array of StringLists, the first holding key names,
the second holding values.
|
|
|