Top Inners Fields Constructors Methods
com.thoughtworks.xstream.converters.javabean

public Class BeanProvider

extends Object
implements JavaBeanProvider
Class Inheritance
All Implemented Interfaces
com.thoughtworks.xstream.converters.javabean.JavaBeanProvider
Imports
java.beans.PropertyDescriptor, java.lang.reflect.Constructor, .InvocationTargetException, .Method, .Modifier, java.util.ArrayList, .Comparator, .Iterator, .List, com.thoughtworks.xstream.converters.ConversionException, .ErrorWritingException, com.thoughtworks.xstream.converters.reflection.ObjectAccessException

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
protected static final Object[]
NO_PARAMS

Deprecated As of 1.4.6
protected PropertyDictionary

Constructor Summary

AccessConstructor and Description
public
BeanProvider()

Construct a BeanProvider that will process the bean properties in their natural order.

public
BeanProvider(final Comparator<T>
the comparator
propertyNameComparator
)

Construct a BeanProvider with a comparator to sort the bean properties by name in the dictionary.

public
BeanProvider(final PropertyDictionary
the property dictionary to use
propertyDictionary
)

Construct a BeanProvider with a provided property dictionary.

Method Summary

Modifier and TypeMethod and Description
public boolean
canInstantiate(Class<T> type)

Implements com.thoughtworks.xstream.converters.javabean.JavaBeanProvider.canInstantiate.

Returns true if the Bean provider can instantiate the specified class
protected boolean
protected Constructor<T>
getDefaultConstrutor(Class<T> type)

Deprecated As of 1.4.6 use newInstance(Class) or canInstantiate(Class) directly.
Returns the default constructor, or null if none is found
protected PropertyDescriptor
getProperty(String name, Class<T> type)

public Class<T>
protected PropertyDescriptor[]
public Object
public boolean
public boolean
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

NO_PARAMSback to summary
protected static final Object[] NO_PARAMS

Deprecated

As of 1.4.6

propertyDictionaryback to summary
protected PropertyDictionary propertyDictionary

Constructor Detail

BeanProviderback to summary
public BeanProvider()

Construct a BeanProvider that will process the bean properties in their natural order.

BeanProviderback to summary
public BeanProvider(final Comparator<T> propertyNameComparator)

Construct a BeanProvider with a comparator to sort the bean properties by name in the dictionary.

Parameters
propertyNameComparator:Comparator<T>

the comparator

BeanProviderback to summary
public BeanProvider(final PropertyDictionary propertyDictionary)

Construct a BeanProvider with a provided property dictionary.

Parameters
propertyDictionary:PropertyDictionary

the property dictionary to use

Since
1.4

Method Detail

canInstantiateback to summary
public boolean canInstantiate(Class<T> type)

Implements com.thoughtworks.xstream.converters.javabean.JavaBeanProvider.canInstantiate.

Returns true if the Bean provider can instantiate the specified class

canStreamPropertyback to summary
protected boolean canStreamProperty(PropertyDescriptor descriptor)
getDefaultConstrutorback to summary
protected Constructor<T> getDefaultConstrutor(Class<T> type)

Deprecated

As of 1.4.6 use newInstance(Class) or canInstantiate(Class) directly.

Returns the default constructor, or null if none is found

getPropertyback to summary
protected PropertyDescriptor getProperty(String name, Class<T> type)
getPropertyTypeback to summary
public Class<T> getPropertyType(Object object, String name)

Implements com.thoughtworks.xstream.converters.javabean.JavaBeanProvider.getPropertyType.

getSerializablePropertiesback to summary
protected PropertyDescriptor[] getSerializableProperties(Object object)
newInstanceback to summary
public Object newInstance(Class<T> type)

Implements com.thoughtworks.xstream.converters.javabean.JavaBeanProvider.newInstance.

propertyDefinedInClassback to summary
public boolean propertyDefinedInClass(String name, Class<T> type)

Implements com.thoughtworks.xstream.converters.javabean.JavaBeanProvider.propertyDefinedInClass.

propertyWriteableback to summary
public boolean propertyWriteable(String name, Class<T> type)
visitSerializablePropertiesback to summary
public void visitSerializableProperties(Object object, JavaBeanProvider.Visitor visitor)

Implements com.thoughtworks.xstream.converters.javabean.JavaBeanProvider.visitSerializableProperties.

writePropertyback to summary
public void writeProperty(Object object, String propertyName, Object value)

Implements com.thoughtworks.xstream.converters.javabean.JavaBeanProvider.writeProperty.

com.thoughtworks.xstream.converters.javabean back to summary

public Interface BeanProvider.Visitor

extends Visitor

Deprecated

As of 1.4 use JavaBeanProvider.Visitor

Method Summary

Inherited from com.thoughtworks.xstream.converters.javabean.JavaBeanProvider.Visitor:
shouldVisitvisit