Class BeanProvider
java.lang.Object
com.thoughtworks.xstream.converters.javabean.BeanProvider
- All Implemented Interfaces:
JavaBeanProvider
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Object[]
Deprecated.As of 1.4.6protected PropertyDictionary
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a BeanProvider that will process the bean properties in their natural order.BeanProvider
(PropertyDictionary propertyDictionary) Construct a BeanProvider with a provided property dictionary.BeanProvider
(Comparator propertyNameComparator) Construct a BeanProvider with a comparator to sort the bean properties by name in the dictionary. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canInstantiate
(Class type) Returns true if the Bean provider can instantiate the specified classprotected boolean
canStreamProperty
(PropertyDescriptor descriptor) protected Constructor
getDefaultConstrutor
(Class type) Deprecated.As of 1.4.6 usenewInstance(Class)
orcanInstantiate(Class)
directly.protected PropertyDescriptor
getProperty
(String name, Class type) getPropertyType
(Object object, String name) protected PropertyDescriptor[]
getSerializableProperties
(Object object) newInstance
(Class type) boolean
propertyDefinedInClass
(String name, Class type) boolean
propertyWriteable
(String name, Class type) void
visitSerializableProperties
(Object object, JavaBeanProvider.Visitor visitor) void
writeProperty
(Object object, String propertyName, Object value)
-
Field Details
-
NO_PARAMS
Deprecated.As of 1.4.6 -
propertyDictionary
-
-
Constructor Details
-
BeanProvider
public BeanProvider()Construct a BeanProvider that will process the bean properties in their natural order. -
BeanProvider
Construct a BeanProvider with a comparator to sort the bean properties by name in the dictionary.- Parameters:
propertyNameComparator
- the comparator
-
BeanProvider
Construct a BeanProvider with a provided property dictionary.- Parameters:
propertyDictionary
- the property dictionary to use- Since:
- 1.4
-
-
Method Details
-
newInstance
- Specified by:
newInstance
in interfaceJavaBeanProvider
-
visitSerializableProperties
- Specified by:
visitSerializableProperties
in interfaceJavaBeanProvider
-
writeProperty
- Specified by:
writeProperty
in interfaceJavaBeanProvider
-
getPropertyType
- Specified by:
getPropertyType
in interfaceJavaBeanProvider
-
propertyDefinedInClass
- Specified by:
propertyDefinedInClass
in interfaceJavaBeanProvider
-
canInstantiate
Returns true if the Bean provider can instantiate the specified class- Specified by:
canInstantiate
in interfaceJavaBeanProvider
-
getDefaultConstrutor
Deprecated.As of 1.4.6 usenewInstance(Class)
orcanInstantiate(Class)
directly.Returns the default constructor, or null if none is found- Parameters:
type
-
-
getSerializableProperties
-
canStreamProperty
-
propertyWriteable
-
getProperty
-
JavaBeanProvider.Visitor