what I have is a super class
class Geometry{
}
and two classes that extends it:
class ShapeOne extends Geometry{}
class ShapeTwo extends Geometry{}
what I want to achieve is to generate a list(read from the database) of objects of the type ShapeOne or ShapeTwo or any other that is instance of Geometry, but dynamically passing the type as a parameter,
for example like:
public ArrayList< Geometry Object > getList(/**passing typeof generated list**/){
  // getting data from Database;
  return new ArrayList<typeof generated list>();
}
so the call would be then like:
 getList(ShapeTwo);
thanks for any help :)