java.lang.Object
com.broadleafcommerce.common.extension.serialization.FuryCloner
All Implemented Interfaces:
Cloner, org.springframework.beans.factory.InitializingBean

public class FuryCloner extends Object implements org.springframework.beans.factory.InitializingBean, Cloner
An implementation of the Cloner interface that provides functionality for deep cloning objects using the Fury serialization library.

This class is designed to be thread-safe by utilizing a thread-safe Fury instance. The Fury instance is configured with properties specified in the SerializationProperties.Cloning object.

As part of the Spring lifecycle, this class implements InitializingBean to initialize the Fury instance after properties are set.

  • Constructor Details

  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • deepClone

      @Nullable public <T> T deepClone(@Nullable T source)
      Description copied from interface: Cloner
      Creates a deep copy of the provided object. This method performs a deep clone operation, replicating the object along with its internal state.
      Specified by:
      deepClone in interface Cloner
      Type Parameters:
      T - the type of the object to be cloned
      Parameters:
      source - the object to be cloned; can be null, in which case the method will return null
      Returns:
      a deep copy of the provided object, or null if the source object is null