Class PrototypeFactory.PrototypeSerializationFactory<T extends java.io.Serializable>

  • All Implemented Interfaces:
    Factory<T>
    Enclosing class:
    PrototypeFactory

    static class PrototypeFactory.PrototypeSerializationFactory<T extends java.io.Serializable>
    extends java.lang.Object
    implements Factory<T>
    PrototypeSerializationFactory creates objects by cloning a prototype using serialization.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T iPrototype
      The object to clone via serialization each time
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PrototypeSerializationFactory​(T prototype)
      Constructor to store prototype
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T create()
      Creates an object using serialization.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • iPrototype

        private final T extends java.io.Serializable iPrototype
        The object to clone via serialization each time
    • Constructor Detail

      • PrototypeSerializationFactory

        private PrototypeSerializationFactory​(T prototype)
        Constructor to store prototype
    • Method Detail

      • create

        public T create()
        Creates an object using serialization.
        Specified by:
        create in interface Factory<T extends java.io.Serializable>
        Returns:
        the new object