java.lang.Object
org.zeroturnaround.javarebel.integration.util.MiscUtil

public abstract class MiscUtil extends Object
Author:
Rein Raudjärv
  • Constructor Details

    • MiscUtil

      public MiscUtil()
  • Method Details

    • identityToString

      public static String identityToString(Object obj)
      Return a String representation of an object's overall identity.
      Parameters:
      obj - the object (may be null)
      Returns:
      the object's identity as String representation, or null String if the object was null
    • identityToString

      public static String identityToString(Class<?> klass)
      Return a String representation of a class' overall identity.
      Parameters:
      klass - the class (may be null)
      Returns:
      the class' identity as String representation, or null String if the class was null
    • identityToString

      public static String identityToString(Class<?>[] classes)
      Return a String representation of a classes' overall identities.
      Parameters:
      classes - the classes (may be null)
      Returns:
      the classes' identities as String representation, or null String if the class was null
    • dumpToString

      public static String dumpToString(Collection<?> objects)
    • dumpToString

      public static String dumpToString(Object obj)
      Return a String representation of an object. Use Object.toString() for classes under org.zeroturnaround.javarebel package. Otherwise use identityToString(Object).
      Parameters:
      obj - the object (may be null)
      Returns:
      a String representation of an object.
    • toString

      public static String toString(Collection<Object> c)
    • toString

      public static String toString(Object[] a)
    • toString

      public static String toString(Object a)
    • add

      public static Class<?>[] add(Class<?>[] array, Class<?> element)
      Adds a class to an array.
    • getSystemClassLoader

      public static ClassLoader getSystemClassLoader()
    • getContextClassLoader

      public static final ClassLoader getContextClassLoader()
    • setContextClassLoader

      public static final ClassLoader setContextClassLoader(ClassLoader cl)
    • objectEquals

      public static boolean objectEquals(Object first, Object second)
    • indexOf

      public static int indexOf(byte[] haystack, byte[] needle)
    • getVmArguments

      public static List<String> getVmArguments()
    • isInContainerTempDir

      public static boolean isInContainerTempDir(File file)
      checks if provided file is in container temp dir, if container has temp dir integration present.
    • hash32

      public static int hash32(byte[] bytes)
    • hash32

      public static int hash32(CharSequence data)