public class BeanProvider extends java.lang.Object implements JavaBeanProvider
Modifier and Type | Class and Description |
---|---|
static interface |
BeanProvider.Visitor
Deprecated.
As of 1.4 use
JavaBeanProvider.Visitor |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.Object[] |
NO_PARAMS
Deprecated.
As of 1.4.6
|
protected PropertyDictionary |
propertyDictionary |
Constructor and Description |
---|
BeanProvider()
Construct a BeanProvider that will process the bean properties in their natural order.
|
BeanProvider(java.util.Comparator propertyNameComparator)
Construct a BeanProvider with a comparator to sort the bean properties by name in the dictionary.
|
BeanProvider(PropertyDictionary propertyDictionary)
Construct a BeanProvider with a provided property dictionary.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canInstantiate(java.lang.Class type)
Returns true if the Bean provider can instantiate the specified class
|
protected boolean |
canStreamProperty(java.beans.PropertyDescriptor descriptor) |
protected java.lang.reflect.Constructor |
getDefaultConstrutor(java.lang.Class type)
Deprecated.
As of 1.4.6 use
newInstance(Class) or canInstantiate(Class) directly. |
protected java.beans.PropertyDescriptor |
getProperty(java.lang.String name,
java.lang.Class type) |
java.lang.Class |
getPropertyType(java.lang.Object object,
java.lang.String name) |
protected java.beans.PropertyDescriptor[] |
getSerializableProperties(java.lang.Object object) |
java.lang.Object |
newInstance(java.lang.Class type) |
boolean |
propertyDefinedInClass(java.lang.String name,
java.lang.Class type) |
boolean |
propertyWriteable(java.lang.String name,
java.lang.Class type) |
void |
visitSerializableProperties(java.lang.Object object,
JavaBeanProvider.Visitor visitor) |
void |
writeProperty(java.lang.Object object,
java.lang.String propertyName,
java.lang.Object value) |
protected static final java.lang.Object[] NO_PARAMS
protected PropertyDictionary propertyDictionary
public BeanProvider()
public BeanProvider(java.util.Comparator propertyNameComparator)
propertyNameComparator
- the comparatorpublic BeanProvider(PropertyDictionary propertyDictionary)
propertyDictionary
- the property dictionary to usepublic java.lang.Object newInstance(java.lang.Class type)
newInstance
in interface JavaBeanProvider
public void visitSerializableProperties(java.lang.Object object, JavaBeanProvider.Visitor visitor)
visitSerializableProperties
in interface JavaBeanProvider
public void writeProperty(java.lang.Object object, java.lang.String propertyName, java.lang.Object value)
writeProperty
in interface JavaBeanProvider
public java.lang.Class getPropertyType(java.lang.Object object, java.lang.String name)
getPropertyType
in interface JavaBeanProvider
public boolean propertyDefinedInClass(java.lang.String name, java.lang.Class type)
propertyDefinedInClass
in interface JavaBeanProvider
public boolean canInstantiate(java.lang.Class type)
canInstantiate
in interface JavaBeanProvider
protected java.lang.reflect.Constructor getDefaultConstrutor(java.lang.Class type)
newInstance(Class)
or canInstantiate(Class)
directly.type
- protected java.beans.PropertyDescriptor[] getSerializableProperties(java.lang.Object object)
protected boolean canStreamProperty(java.beans.PropertyDescriptor descriptor)
public boolean propertyWriteable(java.lang.String name, java.lang.Class type)
protected java.beans.PropertyDescriptor getProperty(java.lang.String name, java.lang.Class type)
Copyright © 2004–2022 XStream. All rights reserved.