Class CloneFactory


  • public class CloneFactory
    extends Object
    Provides methods to create deep-copy clones of various abstract classes or interfaces.
    • Constructor Detail

      • CloneFactory

        public CloneFactory()
    • Method Detail

      • create

        public static Tag create​(Tag original,
                                 Tags destinationTags)
        Creates a deep-copy clone of a given Tag object.
        Parameters:
        original - the original tag to duplicate.
        destinationTags - the list of destination tags. This is used to find and connect opening tags when creating closing tags.
        Returns:
        the new tag.
      • create

        public static Part create​(Part original)
        Creates a deep-copy clone of a given Part/Segment object.
        Parameters:
        original - the original part/segment to duplicate.
        Returns:
        the new part/segment.
      • create

        public static IExtChild create​(IExtChild original)
        Creates a deep-copy clone of a given IExtChild object.
        Parameters:
        original - the original object to duplicate.
        Returns:
        the new object.
      • create

        public static Object create​(Object original)
        Creates a deep-copy clone of a given object.
        Parameters:
        original - the original object to duplicate.
        Returns:
        the new object.