com.thoughtworks.xstream.converters.reflection
Class FieldDictionary

java.lang.Object
  extended by com.thoughtworks.xstream.converters.reflection.FieldDictionary

public class FieldDictionary
extends java.lang.Object

A field dictionary instance caches information about classes fields.


Constructor Summary
FieldDictionary()
           
FieldDictionary(FieldKeySorter sorter)
           
 
Method Summary
 java.lang.reflect.Field field(java.lang.Class cls, java.lang.String name, java.lang.Class definedIn)
          Returns an specific field of some class.
 java.util.Iterator serializableFieldsFor(java.lang.Class cls)
          Returns an iterator for all serializable fields for some class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldDictionary

public FieldDictionary()

FieldDictionary

public FieldDictionary(FieldKeySorter sorter)
Method Detail

serializableFieldsFor

public java.util.Iterator serializableFieldsFor(java.lang.Class cls)
Returns an iterator for all serializable fields for some class

Parameters:
cls - the class you are interested on
Returns:
an iterator for its serializable fields

field

public java.lang.reflect.Field field(java.lang.Class cls,
                                     java.lang.String name,
                                     java.lang.Class definedIn)
Returns an specific field of some class. If definedIn is null, it searchs for the field named 'name' inside the class cls. If definedIn is different than null, tries to find the specified field name in the specified class cls which should be defined in class definedIn (either equals cls or a one of it's superclasses)

Parameters:
cls - the class where the field is to be searched
name - the field name
definedIn - the superclass (or the class itself) of cls where the field was defined
Returns:
the field itself


Joe Walnes, http://xstream.codehaus.org/