com.openharbor.beck.unmarshal
Class DefaultObjectFactory

java.lang.Object
  extended bycom.openharbor.beck.unmarshal.DefaultObjectFactory
All Implemented Interfaces:
ObjectFactory

public class DefaultObjectFactory
extends java.lang.Object
implements ObjectFactory

Instantiates objects using Class.newInstance().


Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
DefaultObjectFactory()
           
 
Method Summary
 java.lang.Object newObject(Unmarshaller unmarshaller)
          Instantiate an object to be mapped from XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log
Constructor Detail

DefaultObjectFactory

public DefaultObjectFactory()
Method Detail

newObject

public java.lang.Object newObject(Unmarshaller unmarshaller)
                           throws java.lang.Exception
Description copied from interface: ObjectFactory
Instantiate an object to be mapped from XML.

Specified by:
newObject in interface ObjectFactory
Parameters:
unmarshaller - contains information about the XML and the expected object class.
Returns:
unmarshaller.getObjectClass().newInstance(); except choose an implementation class if the given class is an interface such as java.util.Collection or Map.
Throws:
java.lang.InstantiationException - if the given class is an interface or abstract class.
java.lang.Exception