Class DeepCloneOperation


  • public class DeepCloneOperation
    extends Object
    Represents the "deep clone" and "ultra deep clone" operations on items and complex type definitions. TODO description
    • Method Detail

      • notUltraDeep

        @NotNull
        public static @NotNull DeepCloneOperation notUltraDeep()
        Deep but not ultra-deep clone operation. We will reuse already cloned definitions.
      • execute

        public ComplexTypeDefinition execute​(@NotNull
                                             @NotNull ComplexTypeDefinition original,
                                             @NotNull
                                             @NotNull Supplier<ComplexTypeDefinition> cloneSupplier,
                                             @NotNull
                                             @NotNull Consumer<ComplexTypeDefinition> cloneProcessor)
        Executes the deep clone operation.
        Parameters:
        original - Definition that is to be cloned
        cloneSupplier - Creates a clone (copy) of the definition
        cloneProcessor - Does the custom processing on the clone, e.g. traversing through individual items This method manages the whole process, e.g. by checking if the definition was already cloned, etc. Note that it is clone processor responsibility to invoke executePostCloneAction(ItemDefinition) on individual item definitions.
      • executePostCloneAction

        public void executePostCloneAction​(ItemDefinition<?> itemClone)