org.jbeanmapper.creator
Class DefaultBeanCreator

java.lang.Object
  extended byorg.jbeanmapper.creator.DefaultBeanCreator
All Implemented Interfaces:
BeanCreator

public class DefaultBeanCreator
extends java.lang.Object
implements BeanCreator

Basic BeanCreator that assumes a no-arg constructor.

Author:
Brian Pugh

Constructor Summary
DefaultBeanCreator()
           
 
Method Summary
 java.lang.Object createBean(java.lang.Class clazz, MappingContext context)
          Creates an instantance of clazz.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBeanCreator

public DefaultBeanCreator()
Method Detail

createBean

public java.lang.Object createBean(java.lang.Class clazz,
                                   MappingContext context)
                            throws java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Creates an instantance of clazz.

Specified by:
createBean in interface BeanCreator
Parameters:
clazz - type of bean that should be created.
context -
Returns:
bean of type clazz.
Throws:
java.lang.InstantiationException - if clazz represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no no-arg constructor;
java.lang.IllegalAccessException - if the class or its nullary constructor is not accessible.
See Also:
Class.newInstance()