public class ReflectionProviderWrapper extends Object implements ReflectionProvider
ReflectionProvider.Visitor
Modifier and Type | Field and Description |
---|---|
protected ReflectionProvider |
wrapped |
Constructor and Description |
---|
ReflectionProviderWrapper(ReflectionProvider wrapper) |
Modifier and Type | Method and Description |
---|---|
boolean |
fieldDefinedInClass(String fieldName,
Class type)
Deprecated.
As of 1.4.5, use
getFieldOrNull(Class, String) instead |
Field |
getField(Class definedIn,
String fieldName)
Returns a field defined in some class.
|
Field |
getFieldOrNull(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) |
protected final ReflectionProvider wrapped
public ReflectionProviderWrapper(ReflectionProvider wrapper)
public boolean fieldDefinedInClass(String fieldName, Class type)
getFieldOrNull(Class, String)
insteadfieldDefinedInClass
in interface ReflectionProvider
public Field getField(Class definedIn, String fieldName)
ReflectionProvider
getField
in interface ReflectionProvider
definedIn
- class where the field was definedfieldName
- field namepublic Field getFieldOrNull(Class definedIn, String fieldName)
ReflectionProvider
getFieldOrNull
in interface ReflectionProvider
definedIn
- class where the field was definedfieldName
- field namepublic Class getFieldType(Object object, String fieldName, Class definedIn)
getFieldType
in interface ReflectionProvider
public Object newInstance(Class type)
ReflectionProvider
newInstance
in interface ReflectionProvider
type
- the type to instantiatepublic void visitSerializableFields(Object object, ReflectionProvider.Visitor visitor)
visitSerializableFields
in interface ReflectionProvider
public void writeField(Object object, String fieldName, Object value, Class definedIn)
writeField
in interface ReflectionProvider
Copyright © 2004–2016 XStream. All rights reserved.