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 TypeMethodDescriptionbooleancanInstantiate(Class type) Returns true if the Bean provider can instantiate the specified classprotected booleancanStreamProperty(PropertyDescriptor descriptor) protected ConstructorgetDefaultConstrutor(Class type) Deprecated.As of 1.4.6 usenewInstance(Class)orcanInstantiate(Class)directly.protected PropertyDescriptorgetProperty(String name, Class type) getPropertyType(Object object, String name) protected PropertyDescriptor[]getSerializableProperties(Object object) newInstance(Class type) booleanpropertyDefinedInClass(String name, Class type) booleanpropertyWriteable(String name, Class type) voidvisitSerializableProperties(Object object, JavaBeanProvider.Visitor visitor) voidwriteProperty(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:
newInstancein interfaceJavaBeanProvider
-
visitSerializableProperties
- Specified by:
visitSerializablePropertiesin interfaceJavaBeanProvider
-
writeProperty
- Specified by:
writePropertyin interfaceJavaBeanProvider
-
getPropertyType
- Specified by:
getPropertyTypein interfaceJavaBeanProvider
-
propertyDefinedInClass
- Specified by:
propertyDefinedInClassin interfaceJavaBeanProvider
-
canInstantiate
Returns true if the Bean provider can instantiate the specified class- Specified by:
canInstantiatein 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