Class PrototypeFactory.PrototypeCloneFactory
java.lang.Object
org.apache.commons.collections.functors.PrototypeFactory.PrototypeCloneFactory
- All Implemented Interfaces:
Serializable
,Factory
- Enclosing class:
PrototypeFactory
PrototypeCloneFactory creates objects by copying a prototype using the clone method.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
PrototypeCloneFactory
(Object prototype, Method method) Constructor to store prototype. -
Method Summary
Modifier and TypeMethodDescriptioncreate()
Creates an object by calling the clone method.private void
Find the Clone method for the class specified.private void
Overrides the default readObject implementation to prevent de-serialization (see COLLECTIONS-580).private void
Overrides the default writeObject implementation to prevent serialization (see COLLECTIONS-580).
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDThe serial version- See Also:
-
iPrototype
The object to clone each time -
iCloneMethod
The method used to clone
-
-
Constructor Details
-
PrototypeCloneFactory
Constructor to store prototype.
-
-
Method Details
-
findCloneMethod
private void findCloneMethod()Find the Clone method for the class specified. -
create
Creates an object by calling the clone method. -
writeObject
Overrides the default writeObject implementation to prevent serialization (see COLLECTIONS-580).- Throws:
IOException
-
readObject
Overrides the default readObject implementation to prevent de-serialization (see COLLECTIONS-580).- Throws:
ClassNotFoundException
IOException
-