Class PrototypeFactory.PrototypeCloneFactory<T>
- java.lang.Object
-
- org.apache.commons.collections4.functors.PrototypeFactory.PrototypeCloneFactory<T>
-
- All Implemented Interfaces:
Factory<T>
- Enclosing class:
- PrototypeFactory
static class PrototypeFactory.PrototypeCloneFactory<T> extends java.lang.Object implements Factory<T>
PrototypeCloneFactory creates objects by copying a prototype using the clone method.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.MethodiCloneMethodThe method used to cloneprivate TiPrototypeThe object to clone each time
-
Constructor Summary
Constructors Modifier Constructor Description privatePrototypeCloneFactory(T prototype, java.lang.reflect.Method method)Constructor to store prototype.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcreate()Creates an object by calling the clone method.private voidfindCloneMethod()Find the Clone method for the class specified.
-
-
-
Field Detail
-
iPrototype
private final T iPrototype
The object to clone each time
-
iCloneMethod
private transient java.lang.reflect.Method iCloneMethod
The method used to clone
-
-
Constructor Detail
-
PrototypeCloneFactory
private PrototypeCloneFactory(T prototype, java.lang.reflect.Method method)
Constructor to store prototype.
-
-