public class ReflectionUtils
extends java.lang.Object
| Constructor and Description |
|---|
ReflectionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
copy(Configuration conf,
T src,
T dst)
Make a copy of the writable object using serialization to a buffer
|
static <T> java.lang.Class<T> |
getClass(T o)
Return the correctly-typed
Class of the given object. |
static <T> T |
newInstance(java.lang.Class<T> theClass,
Configuration conf)
Create an object for the given class and initialize it from conf
|
static void |
printThreadInfo(java.io.PrintWriter stream,
java.lang.String title)
Print all of the thread's information and stack traces.
|
static void |
setConf(java.lang.Object theObject,
Configuration conf)
Check and set 'configuration' if necessary.
|
static void |
setContentionTracing(boolean val) |
public static void setConf(java.lang.Object theObject,
Configuration conf)
theObject - object for which to set configurationconf - Configurationpublic static <T> T newInstance(java.lang.Class<T> theClass,
Configuration conf)
theClass - class of which an object is createdconf - Configurationpublic static void setContentionTracing(boolean val)
public static void printThreadInfo(java.io.PrintWriter stream,
java.lang.String title)
stream - the stream totitle - a string title for the stack tracepublic static <T> java.lang.Class<T> getClass(T o)
Class of the given object.o - object whose correctly-typed Class is to be obtainedClass of the given object.public static <T> T copy(Configuration conf, T src, T dst) throws java.io.IOException
dst - the object to copy fromsrc - the object to copy into, which is destroyedjava.io.IOException