How do you pass a generic type ('Object myVar') as a parameter to replace a class type ('SomeClass.class')?
<p>How do you pass a class type as parameter?</p>

<pre><code>public Configuration getConfig(Object mapper, Object format) {
    Configuration conf = new Configuration(false);
    conf.setClass("mapreduce.map.class", TestMapper.class, Mapper.class);
    conf.setClass("mapreduce.inputformat.class", DatastoreInputFormat.class, InputFormat.class);
    return conf;
}
</code></pre>

<p>I want to replace the value <code>TestMapper.class</code> and <code>DatastoreInputFormat.class</code> with the parameters <code>mapper</code> and <code>format</code>, respectively.</p>

<p>I'm not sure how to convert from <code>Object</code> to <code>TestMapper.class</code>.</p>
