Class PrototypeFactory.PrototypeSerializationFactory
- java.lang.Object
-
- org.apache.commons.collections.functors.PrototypeFactory.PrototypeSerializationFactory
-
- All Implemented Interfaces:
java.io.Serializable,Factory
- Enclosing class:
- PrototypeFactory
static class PrototypeFactory.PrototypeSerializationFactory extends java.lang.Object implements Factory, java.io.Serializable
PrototypeSerializationFactory creates objects by cloning a prototype using serialization.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.SerializableiPrototypeThe object to clone via serialization each timeprivate static longserialVersionUIDThe serial version
-
Constructor Summary
Constructors Modifier Constructor Description privatePrototypeSerializationFactory(java.io.Serializable prototype)Constructor to store prototype
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectcreate()Creates an object using serialization.private voidreadObject(java.io.ObjectInputStream is)Overrides the default readObject implementation to prevent de-serialization (see COLLECTIONS-580).private voidwriteObject(java.io.ObjectOutputStream os)Overrides the default writeObject implementation to prevent serialization (see COLLECTIONS-580).
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The serial version- See Also:
- Constant Field Values
-
iPrototype
private final java.io.Serializable iPrototype
The object to clone via serialization each time
-
-
Method Detail
-
create
public java.lang.Object create()
Creates an object using serialization.
-
writeObject
private void writeObject(java.io.ObjectOutputStream os) throws java.io.IOExceptionOverrides the default writeObject implementation to prevent serialization (see COLLECTIONS-580).- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream is) throws java.lang.ClassNotFoundException, java.io.IOExceptionOverrides the default readObject implementation to prevent de-serialization (see COLLECTIONS-580).- Throws:
java.lang.ClassNotFoundExceptionjava.io.IOException
-
-