Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.thoughtworks.xstream.converters.reflection
Interface ReflectionProvider

All Known Implementing Classes:
  HarmonyReflectionProvider, PureJavaReflectionProvider, ReflectionProviderWrapper, Sun14ReflectionProvider

    public interface ReflectionProvider

Provides core reflection services.

Author:
  Joe Walnes

Nested Class Summary
`static interface` | `ReflectionProvider.Visitor` A visitor interface for serializable fields defined in a class.

Method Summary
`boolean` | `fieldDefinedInClass(String fieldName, Class type)`
`Field` | `getField(Class definedIn, String fieldName)` Returns a field defined in some class.
`Class` | `getFieldType(Object object, String fieldName, Class definedIn)`
`Object` | `newInstance(Class type)` Creates a new instance of the specified type.
`void` | `visitSerializableFields(Object object, ReflectionProvider.Visitor visitor)`
`void` | `writeField(Object object, String fieldName, Object value, Class definedIn)`

Method Detail

### newInstance

    Object newInstance(Class type)

  Creates a new instance of the specified type. It is in the responsibility of the implementation how such an instance is created.

  Parameters:
    `type` - the type to instantiate
  Returns:
    a new instance of this type

### visitSerializableFields

    void visitSerializableFields(Object object,
                                 ReflectionProvider.Visitor visitor)

### writeField

    void writeField(Object object,
                    String fieldName,
                    Object value,
                    Class definedIn)

### getFieldType

    Class getFieldType(Object object,
                       String fieldName,
                       Class definedIn)

### fieldDefinedInClass

    boolean fieldDefinedInClass(String fieldName,
                                Class type)

### getField

    Field getField(Class definedIn,
                   String fieldName)

  Returns a field defined in some class.

  Parameters:
    `definedIn` - class where the field was defined
    `fieldName` - field name
  Returns:
    the field itself

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 XStream. All Rights Reserved.