org.apache.commons.collections15.functors
Class PrototypeFactory<T>
java.lang.Object
org.apache.commons.collections15.functors.PrototypeFactory<T>
public class PrototypeFactory<T>
- extends Object
Factory implementation that creates a new instance each time based on a prototype.
- Since:
- Commons Collections 3.0
- Version:
- $Revision: 1.1 $ $Date: 2005/10/11 17:05:24 $
- Author:
- Matt Hall, John Watkinson, Stephen Colebourne
Method Summary |
static
|
getInstance(T prototype)
Factory method that performs validation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static <T> Factory<T> getInstance(T prototype)
- Factory method that performs validation.
Creates a Factory that will return a clone of the same prototype object
each time the factory is used. The prototype will be cloned using one of these
techniques (in order):
- public clone method
- public copy constructor
- serialization clone
Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.