public class

FieldDictionary

extends Object
java.lang.Object
   ↳ com.thoughtworks.xstream.converters.reflection.FieldDictionary

Class Overview

A field dictionary instance caches information about classes fields.

Summary

Public Constructors
FieldDictionary()
FieldDictionary(FieldKeySorter sorter)
Public Methods
Field field(Class cls, String name, Class definedIn)
Returns an specific field of some class.
Iterator fieldsFor(Class cls)
Returns an iterator for all fields for some class
Iterator serializableFieldsFor(Class cls)
This method is deprecated. since 1.3, use fieldsFor(Class) instead
Protected Methods
Object readResolve()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FieldDictionary ()

public FieldDictionary (FieldKeySorter sorter)

Public Methods

public Field field (Class cls, String name, Class definedIn)

Returns an specific field of some class. If definedIn is null, it searches 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

public Iterator fieldsFor (Class cls)

Returns an iterator for all fields for some class

Parameters
cls the class you are interested on
Returns
  • an iterator for its fields

public Iterator serializableFieldsFor (Class cls)

This method is deprecated.
since 1.3, use fieldsFor(Class) instead

Returns an iterator for all fields for some class

Parameters
cls the class you are interested on
Returns
  • an iterator for its fields

Protected Methods

protected Object readResolve ()