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.Serializable
iPrototype
The object to clone via serialization each timeprivate static long
serialVersionUID
The serial version
-
Constructor Summary
Constructors Modifier Constructor Description private
PrototypeSerializationFactory(java.io.Serializable prototype)
Constructor to store prototype
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
create()
Creates an object using serialization.private void
readObject(java.io.ObjectInputStream is)
Overrides the default readObject implementation to prevent de-serialization (see COLLECTIONS-580).private void
writeObject(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.IOException
Overrides 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.IOException
Overrides the default readObject implementation to prevent de-serialization (see COLLECTIONS-580).- Throws:
java.lang.ClassNotFoundException
java.io.IOException
-
-