|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thoughtworks.xstream.converters.javabean.BeanProvider
public class BeanProvider
Nested Class Summary | |
---|---|
static interface |
BeanProvider.Visitor
Deprecated. As of 1.4 use JavaBeanProvider.Visitor |
Field Summary | |
---|---|
protected static Object[] |
NO_PARAMS
|
protected PropertyDictionary |
propertyDictionary
|
Constructor Summary | |
---|---|
BeanProvider()
Construct a BeanProvider that will process the bean properties in their natural order. |
|
BeanProvider(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. |
Method Summary | |
---|---|
boolean |
canInstantiate(Class type)
Returns true if the Bean provider can instantiate the specified class |
protected boolean |
canStreamProperty(PropertyDescriptor descriptor)
|
protected Constructor |
getDefaultConstrutor(Class type)
Returns the default constructor, or null if none is found |
protected PropertyDescriptor |
getProperty(String name,
Class type)
|
Class |
getPropertyType(Object object,
String name)
|
protected PropertyDescriptor[] |
getSerializableProperties(Object 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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Object[] NO_PARAMS
protected PropertyDictionary propertyDictionary
Constructor Detail |
---|
public BeanProvider()
public BeanProvider(Comparator propertyNameComparator)
propertyNameComparator
- the comparatorpublic BeanProvider(PropertyDictionary propertyDictionary)
propertyDictionary
- the property dictionary to useMethod Detail |
---|
public Object newInstance(Class type)
newInstance
in interface JavaBeanProvider
public void visitSerializableProperties(Object object, JavaBeanProvider.Visitor visitor)
visitSerializableProperties
in interface JavaBeanProvider
public void writeProperty(Object object, String propertyName, Object value)
writeProperty
in interface JavaBeanProvider
public Class getPropertyType(Object object, String name)
getPropertyType
in interface JavaBeanProvider
public boolean propertyDefinedInClass(String name, Class type)
propertyDefinedInClass
in interface JavaBeanProvider
public boolean canInstantiate(Class type)
canInstantiate
in interface JavaBeanProvider
protected Constructor getDefaultConstrutor(Class type)
type
- protected PropertyDescriptor[] getSerializableProperties(Object object)
protected boolean canStreamProperty(PropertyDescriptor descriptor)
public boolean propertyWriteable(String name, Class type)
protected PropertyDescriptor getProperty(String name, Class type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |