org.tynamo.builder
Class BuilderDirector
java.lang.Object
org.tynamo.builder.BuilderDirector
public class BuilderDirector
- extends Object
Fulfils the "Director" role in the Tynamo implementation of
GOF's Builder pattern
Constructs an object using the Builder interface
|
Method Summary |
|
createNewInstance(Class<T> type)
Create a new instance of an object of class 'type' using a Builder. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BuilderDirector
public BuilderDirector(org.slf4j.Logger logger)
BuilderDirector
public BuilderDirector(org.slf4j.Logger logger,
Map<Class,Builder> builders)
createNewInstance
public <T> T createNewInstance(Class<T> type)
- Create a new instance of an object of class 'type' using a Builder.
- Parameters:
type - is a class whose instance should be created, it shouldn't be NULL
- Returns:
- a newly created object
Copyright © 2004-2009. All Rights Reserved.