Public field from String - How can you get a public field vis its name(string) : <p>So in a class (ImportantClass123) I have this:</p>

<pre><code>public AnotherImportantClass aReallyImportantClass;
</code></pre>

<p>How do I return</p>

<pre><code>AnotherImportantClass
</code></pre>

<p>via knowledge of what its named as a field:</p>

<pre><code>aReallyImportantClass
</code></pre>

<p>Something like </p>

<pre><code>ImportantClass123.getFieldWithName("aReallyImportantClass");
</code></pre>

<p>?</p>

<p>How would I write getFieldWithName? and what would be its return type? Class?</p>
