Pass the parameter Object
<p>I have this test method:</p>

<pre><code>public void load(Class&lt;? extends Object&gt; className, XXXX)
{
  Criteria criteria = session.createCriteria(className);
  List&lt;Object&gt; list = criteria.list();

  for (Object item : list)
  {
    list.add(new Object(item.getId, item.getCode); /* Object doesn't know getId */
  }
}
</code></pre>

<p>How to replace XXXX in load method to call it using concrete <code>Object</code>? Something like:</p>

<pre><code>load(Foo.class, testObject)
</code></pre>

<p>Is it possible?</p>
