How to list component fields in a class
<p>If I give you a class like:</p>

<pre><code>public class A {
        protected ClassType a1;
        protected ClassType a2;
        protected int a3;
    }
    public class B {
        protected ClassType b1;
        protected EnumType b2;
        protected boolean b3;
    }
    public enum C {
        c1,
        c2,
        c3
    }
    public class All {
        protected ClassType A;
        protected ClassType B;
        protected EnumType C;
    }
</code></pre>

<p>How can I write a function through which class object "<strong>All</strong>" is passed,,,like "<code>foo(All all);</code>" to get <strong>all the members' names(like "A") in "all"</strong> including <strong>its member's member's name</strong>?</p>

<p>I don't know if I made that clear.</p>

<p>Thanks in advance !
<strong>:-)</strong></p>
