com.thoughtworks.xstream.converters.reflection
Class ReflectionProviderWrapper

java.lang.Object
  extended by com.thoughtworks.xstream.converters.reflection.ReflectionProviderWrapper
All Implemented Interfaces:
ReflectionProvider

public class ReflectionProviderWrapper
extends Object
implements ReflectionProvider

A wrapper implementation for the ReflectionProvider.

Since:
1.2
Author:
Jörg Schaible

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.thoughtworks.xstream.converters.reflection.ReflectionProvider
ReflectionProvider.Visitor
 
Field Summary
protected  ReflectionProvider wrapped
           
 
Constructor Summary
ReflectionProviderWrapper(ReflectionProvider wrapper)
           
 
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wrapped

protected final ReflectionProvider wrapped
Constructor Detail

ReflectionProviderWrapper

public ReflectionProviderWrapper(ReflectionProvider wrapper)
Method Detail

fieldDefinedInClass

public boolean fieldDefinedInClass(String fieldName,
                                   Class type)
Specified by:
fieldDefinedInClass in interface ReflectionProvider

getField

public Field getField(Class definedIn,
                      String fieldName)
Description copied from interface: ReflectionProvider
Returns a field defined in some class.

Specified by:
getField in interface ReflectionProvider
Parameters:
definedIn - class where the field was defined
fieldName - field name
Returns:
the field itself

getFieldType

public Class getFieldType(Object object,
                          String fieldName,
                          Class definedIn)
Specified by:
getFieldType in interface ReflectionProvider

newInstance

public Object newInstance(Class type)
Description copied from interface: ReflectionProvider
Creates a new instance of the specified type. It is in the responsibility of the implementation how such an instance is created.

Specified by:
newInstance in interface ReflectionProvider
Parameters:
type - the type to instantiate
Returns:
a new instance of this type

visitSerializableFields

public void visitSerializableFields(Object object,
                                    ReflectionProvider.Visitor visitor)
Specified by:
visitSerializableFields in interface ReflectionProvider

writeField

public void writeField(Object object,
                       String fieldName,
                       Object value,
                       Class definedIn)
Specified by:
writeField in interface ReflectionProvider


Copyright © 2004-2014 XStream. All Rights Reserved.