use variable type to define another variable type
<p>Im trying to use the type of one variable to define the type on another
I know i could just put all the types in an enum then use ordinal with a switch/case to select but i'm wondering if theres an easier way.</p>

<p>Heres a small example:</p>

<pre><code>public void loadRotation(TetrominoType type) {
TetrominoType new = new type.class();
}

TetroiminoType type = new RedTetro();
this.loadRotation(type);
</code></pre>

<p>RedTetro obviously extends TetrminoType</p>

<p>I know this won't work but hopefully from it you understand what i'm trying to do.</p>
