Class Objects

java.lang.Object
nu.studer.gradle.jooq.util.Objects

public final class Objects extends Object
Utility class.
  • Method Details

    • applyClosureToDelegate

      public static void applyClosureToDelegate(groovy.lang.Closure<?> closure, Object delegate)
      Applies the given closure to the given delegate.
      Parameters:
      closure - the closure to apply
      delegate - the delegate that the closure is applied to
    • cloneObject

      public static <T> T cloneObject(T obj)
      Clones the given object via in-memory object serialization and deserialization.
      Type Parameters:
      T - the type of the object to clone
      Parameters:
      obj - the object to clone
      Returns:
      the cloned object
    • deepHash

      public static String deepHash(Object obj)
      Calculates a hash of the given object from its serialized version. This method is thread-safe, can be used in parallel builds without an issue.
      Parameters:
      obj - the object for which to calculate the hash
      Returns:
      the hash