title: How to pass a static class as an argument in Java
body: <p>I have a base class called "Entity" which has a static method called "construct" that returns an Entity instance. I have several different subclasses of this class (for demonstration assume we have "Fruit" and "Vegetable" as subclasses). 
  I would like to be able to do something along the following lines:</p>
  
  <pre><code>Entity a = someFunction(Fruit, textfile)
  </code></pre>
  
  <p>someFunction would then pass textfile to Fruit.construct and return the Entity generated.
  Is there a simple way to do this?</p>