public interface ReflectionProvider
Modifier and Type | Interface and Description |
---|---|
static interface |
ReflectionProvider.Visitor
A visitor interface for serializable fields defined in a class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
fieldDefinedInClass(java.lang.String fieldName,
java.lang.Class type)
Deprecated.
As of 1.4.5, use
getFieldOrNull(Class, String) instead |
java.lang.reflect.Field |
getField(java.lang.Class definedIn,
java.lang.String fieldName)
Returns a field defined in some class.
|
java.lang.reflect.Field |
getFieldOrNull(java.lang.Class definedIn,
java.lang.String fieldName)
Returns a field defined in some class.
|
java.lang.Class |
getFieldType(java.lang.Object object,
java.lang.String fieldName,
java.lang.Class definedIn) |
java.lang.Object |
newInstance(java.lang.Class type)
Creates a new instance of the specified type.
|
void |
visitSerializableFields(java.lang.Object object,
ReflectionProvider.Visitor visitor) |
void |
writeField(java.lang.Object object,
java.lang.String fieldName,
java.lang.Object value,
java.lang.Class definedIn) |
java.lang.Object newInstance(java.lang.Class type)
type
- the type to instantiatevoid visitSerializableFields(java.lang.Object object, ReflectionProvider.Visitor visitor)
void writeField(java.lang.Object object, java.lang.String fieldName, java.lang.Object value, java.lang.Class definedIn)
java.lang.Class getFieldType(java.lang.Object object, java.lang.String fieldName, java.lang.Class definedIn)
boolean fieldDefinedInClass(java.lang.String fieldName, java.lang.Class type)
getFieldOrNull(Class, String)
insteadjava.lang.reflect.Field getField(java.lang.Class definedIn, java.lang.String fieldName)
definedIn
- class where the field was definedfieldName
- field nameObjectAccessException
- if field does not existjava.lang.reflect.Field getFieldOrNull(java.lang.Class definedIn, java.lang.String fieldName)
definedIn
- class where the field was definedfieldName
- field nameCopyright © 2004–2024 XStream. All rights reserved.