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.Method
iCloneMethod
The method used to cloneprivate T
iPrototype
The object to clone each time
-
Constructor Summary
Constructors Modifier Constructor Description private
PrototypeCloneFactory(T prototype, java.lang.reflect.Method method)
Constructor to store prototype.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
create()
Creates an object by calling the clone method.private void
findCloneMethod()
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.
-
-