net.sf.doolin.util.factory
Class SimpleDataFactory<T>

java.lang.Object
  extended by net.sf.doolin.util.factory.SimpleDataFactory<T>
Type Parameters:
T - Type of the bean to create.
All Implemented Interfaces:
DataFactory<T>

public class SimpleDataFactory<T>
extends Object
implements DataFactory<T>

Just instantiates a bean given its class.

Author:
Damien Coraboeuf

Constructor Summary
SimpleDataFactory()
          Default constructor
SimpleDataFactory(Class<T> beanClass)
          Instantiates a new simple data factory.
 
Method Summary
 T create(Object any)
          Creates an arbitrary object.
 void setBeanClass(Class<T> beanClass)
          Sets the class to create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDataFactory

public SimpleDataFactory()
Default constructor


SimpleDataFactory

public SimpleDataFactory(Class<T> beanClass)
Instantiates a new simple data factory.

Parameters:
beanClass - the bean class
Method Detail

create

public T create(Object any)
Description copied from interface: DataFactory
Creates an arbitrary object.

Specified by:
create in interface DataFactory<T>
Parameters:
any - Context of creation
Returns:
Created object.
See Also:
Utils.newInstance(Class)

setBeanClass

public void setBeanClass(Class<T> beanClass)
Sets the class to create

Parameters:
beanClass - Class


Copyright © 2011. All Rights Reserved.