org.apache.hadoop.util
Class ReflectionUtils

java.lang.Object
  extended by org.apache.hadoop.util.ReflectionUtils

public class ReflectionUtils
extends Object

General reflection utils


Constructor Summary
ReflectionUtils()
           
 
Method Summary
static Object newInstance(Class theClass, Configuration conf)
          Create an object for the given class and initialize it from conf
static void setConf(Object theObject, Configuration conf)
          Check and set 'configuration' if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionUtils

public ReflectionUtils()
Method Detail

setConf

public static void setConf(Object theObject,
                           Configuration conf)
Check and set 'configuration' if necessary.

Parameters:
theObject - object for which to set configuration
conf - Configuration

newInstance

public static Object newInstance(Class theClass,
                                 Configuration conf)
Create an object for the given class and initialize it from conf

Parameters:
theClass - class of which an object is created
conf - Configuration
Returns:
a new object


Copyright © 2007, 2012, Oracle and/or its affiliates. All rights reserved.