com.thoughtworks.xstream.converters.javabean
Class BeanProvider
java.lang.Object
com.thoughtworks.xstream.converters.javabean.BeanProvider
public class BeanProvider
- extends Object
Pure Java ObjectFactory that instantiates objects using standard Java
reflection, however the types of objects that can be constructed are limited.
Can newInstance: classes with public visibility, outer classes, static
inner classes, classes with default constructors and any class that
implements java.io.Serializable. Cannot newInstance: classes without public
visibility, non-static inner classes, classes without default constructors.
Note that any code in the constructor of a class will be executed when the
ObjectFactory instantiates the object.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
propertyDictionary
protected PropertyDictionary propertyDictionary
NO_PARAMS
protected static final Object[] NO_PARAMS
BeanProvider
public BeanProvider()
newInstance
public Object newInstance(Class type)
visitSerializableProperties
public void visitSerializableProperties(Object object,
com.thoughtworks.xstream.converters.javabean.BeanProvider.Visitor visitor)
writeProperty
public void writeProperty(Object object,
String propertyName,
Object value)
getPropertyType
public Class getPropertyType(Object object,
String name)
propertyDefinedInClass
public boolean propertyDefinedInClass(String name,
Class type)
canInstantiate
public boolean canInstantiate(Class type)
- Returns true if the Bean provider can instantiate the specified class
getDefaultConstrutor
protected Constructor getDefaultConstrutor(Class type)
- Returns the default constructor, or null if none is found
- Parameters:
type -
Copyright © 2004-2007 XStream. All Rights Reserved.