Class MiscUtil
- java.lang.Object
-
- org.zeroturnaround.javarebel.integration.util.MiscUtil
-
public abstract class MiscUtil extends Object
- Author:
- Rein Raudjärv
-
-
Constructor Summary
Constructors Constructor Description MiscUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<?>[]add(Class<?>[] array, Class<?> element)Adds a class to an array.static StringdumpToString(Object obj)Return a String representation of an object.static ClassLoadergetContextClassLoader()static ClassLoadergetSystemClassLoader()static List<String>getVmArguments()static inthash32(byte[] bytes)static inthash32(CharSequence data)static StringidentityToString(Class<?> klass)Return a String representation of a class' overall identity.static StringidentityToString(Class<?>[] classes)Return a String representation of a classes' overall identities.static StringidentityToString(Object obj)Return a String representation of an object's overall identity.static intindexOf(byte[] haystack, byte[] needle)static booleanisInContainerTempDir(File file)checks if provided file is in container temp dir, if container has temp dir integration present.static booleanobjectEquals(Object first, Object second)static ClassLoadersetContextClassLoader(ClassLoader cl)static StringtoString(Object a)static StringtoString(Object[] a)static StringtoString(Collection<Object> c)
-
-
-
Method Detail
-
identityToString
public static String identityToString(Object obj)
Return a String representation of an object's overall identity.- Parameters:
obj- the object (may benull)- Returns:
- the object's identity as String representation,
or
nullString if the object wasnull
-
identityToString
public static String identityToString(Class<?> klass)
Return a String representation of a class' overall identity.- Parameters:
klass- the class (may benull)- Returns:
- the class' identity as String representation,
or
nullString if the class wasnull
-
identityToString
public static String identityToString(Class<?>[] classes)
Return a String representation of a classes' overall identities.- Parameters:
classes- the classes (may benull)- Returns:
- the classes' identities as String representation,
or
nullString if the class wasnull
-
dumpToString
public static String dumpToString(Object obj)
Return a String representation of an object. UseObject.toString()for classes underorg.zeroturnaround.javarebelpackage. Otherwise useidentityToString(Object).- Parameters:
obj- the object (may benull)- Returns:
- a String representation of an object.
-
toString
public static String toString(Collection<Object> c)
-
getSystemClassLoader
public static ClassLoader getSystemClassLoader()
-
getContextClassLoader
public static final ClassLoader getContextClassLoader()
-
setContextClassLoader
public static final ClassLoader setContextClassLoader(ClassLoader cl)
-
indexOf
public static int indexOf(byte[] haystack, byte[] needle)
-
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)
-
-