Class NullCopier<T>

java.lang.Object
io.github.sugarcubes.cloner.NullCopier<T>
All Implemented Interfaces:
ObjectCopier<T>, TrivialCopier<T>

public final class NullCopier<T> extends Object implements TrivialCopier<T>
Copier which always returns null.
  • Method Details

    • copy

      public T copy(T original, CopyContext context) throws Exception
      Description copied from interface: ObjectCopier
      Creates a copy of the original object. The implementation MUST call CopyContext.register(Object) method.
      Specified by:
      copy in interface ObjectCopier<T>
      Parameters:
      original - original object
      context - copying context or null if the copier is trivial
      Returns:
      copy result
      Throws:
      Exception - if something went wrong