net.sf.seaf.factory.impl
Class DefaultInstantiatingFactory
java.lang.Object
net.sf.seaf.factory.impl.DefaultInstantiatingFactory
- All Implemented Interfaces:
- Factory
public class DefaultInstantiatingFactory
- extends Object
- implements Factory
Factory that always returns a new instance of the requested type created via
Class.newInstance(). The requested type must therefore have a public
default constructor.
Checked exceptions are re-thrown as SeafInstantiationException with
the original exception wrapped.
- See Also:
Class.newInstance()
|
Method Summary |
|
getInstanceOf(Class<Type> type)
Return an initialized instance of the specified type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultInstantiatingFactory
public DefaultInstantiatingFactory()
getInstanceOf
public final <Type> Type getInstanceOf(Class<Type> type)
throws SeafInstantiationException
- Description copied from interface:
Factory
- Return an initialized instance of the specified type.
- Specified by:
getInstanceOf in interface Factory
- Parameters:
type - The type of the requested instance
- Returns:
- The instance
- Throws:
SeafInstantiationException
Copyright © 2008-2012 SEAF. All Rights Reserved.