org.base.apps.util.factory
Class BaseFactory

java.lang.Object
  extended by org.base.apps.util.factory.BaseFactory
All Implemented Interfaces:
Factory
Direct Known Subclasses:
ConfigurableFactory

public class BaseFactory
extends Object
implements Factory

Default implementation of Factory, delegating to FactoryUtils.instantiateFactory(Class) and ignoring the specified args.

Author:
Kevan Simpson

Constructor Summary
BaseFactory()
           
 
Method Summary
<T> T
create(Class<T> type, Object... args)
          Creates a new instance of the specified class, optionally using the given arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFactory

public BaseFactory()
Method Detail

create

public <T> T create(Class<T> type,
                    Object... args)
Description copied from interface: Factory
Creates a new instance of the specified class, optionally using the given arguments.

Specified by:
create in interface Factory
Type Parameters:
T - The generic representing type of the new instance.
Parameters:
type - The type of the new instance.
args - Optionally used arguments used to create the new instance.
Returns:
A new instance of the given type or null.
See Also:
Factory.create(java.lang.Class, java.lang.Object[])

Please visit Base Apps, hosted on Sourceforge.net.

Copyright 2011, Blue Agate Software Entity (BASE)