com.thoughtworks.xstream.objecttree.reflection
Class JavaReflectionObjectFactory
java.lang.Object
com.thoughtworks.xstream.objecttree.reflection.JavaReflectionObjectFactory
- All Implemented Interfaces:
- ObjectFactory
- public class JavaReflectionObjectFactory
- extends java.lang.Object
- implements ObjectFactory
Pure Java ObjectFactory that instantiates objects using standard Java reflection, however the types of objects
that can be constructed are limited.
Can create: classes with public visibility, outer classes, static inner classes, classes with default constructors.
Cannot create: 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.
Method Summary |
java.lang.Object |
create(java.lang.Class type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaReflectionObjectFactory
public JavaReflectionObjectFactory()
create
public java.lang.Object create(java.lang.Class type)
- Specified by:
create
in interface ObjectFactory