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
ConstructorsModifierConstructorDescriptionprivatePrototypeCloneFactory(Object prototype, Method method) Constructor to store prototype. -
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates an object by calling the clone method.private voidFind the Clone method for the class specified.private voidOverrides the default readObject implementation to prevent de-serialization (see COLLECTIONS-580).private voidOverrides 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:
ClassNotFoundExceptionIOException
-