public abstract class MiscUtil extends Object
| Constructor and Description |
|---|
MiscUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Class<?>[] |
add(Class<?>[] array,
Class<?> element)
Adds a class to an array.
|
static String |
dumpToString(Object obj)
Return a String representation of an object.
|
static ClassLoader |
getContextClassLoader() |
static ClassLoader |
getSystemClassLoader() |
static List<String> |
getVmArguments() |
static int |
hash32(byte[] bytes) |
static int |
hash32(CharSequence data) |
static String |
identityToString(Class<?> klass)
Return a String representation of a class' overall identity.
|
static String |
identityToString(Class<?>[] classes)
Return a String representation of a classes' overall identities.
|
static String |
identityToString(Object obj)
Return a String representation of an object's overall identity.
|
static int |
indexOf(byte[] haystack,
byte[] needle) |
static boolean |
isInContainerTempDir(File file)
checks if provided file is in container temp dir, if container has temp dir integration present.
|
static boolean |
objectEquals(Object first,
Object second) |
static ClassLoader |
setContextClassLoader(ClassLoader cl) |
static String |
toString(Collection<Object> c) |
static String |
toString(Object a) |
static String |
toString(Object[] a) |
public static String identityToString(Object obj)
obj - the object (may be null)null String if the object was nullpublic static String identityToString(Class<?> klass)
klass - the class (may be null)null String if the class was nullpublic static String identityToString(Class<?>[] classes)
classes - the classes (may be null)null String if the class was nullpublic static String dumpToString(Object obj)
Object.toString() for classes under org.zeroturnaround.javarebel package.
Otherwise use identityToString(Object).obj - the object (may be null)public static String toString(Collection<Object> c)
public static ClassLoader getSystemClassLoader()
public static final ClassLoader getContextClassLoader()
public static final ClassLoader setContextClassLoader(ClassLoader cl)
public static int indexOf(byte[] haystack,
byte[] needle)
public static boolean isInContainerTempDir(File file)
public static int hash32(byte[] bytes)
public static int hash32(CharSequence data)
Copyright © 2018. All rights reserved.