I am unable to find out how to do this. I am being told that a type and a class are two different things, which I didn't know, but doesn't suprise me. When I use the type varriable 'M', I am told that it was expecting a class, not a type. I am willing to take in parameters in any way. Also, if there is a way to get an array of these classes, that would be the best.
public <M> void addModule()
{
Module module = new M(); // This is the error, other stuff shouldn't matter
module.setStructure(this);
modules.add(module);
}