Hi All,<div><br></div><div>Seems that nested classes aren&#39;t handled correctly by forge.</div><div><br></div><div>If you have a java source file like this</div><div><br></div><div><pre><span>public</span> class CustomProjectStageHolder <span>implements</span> ProjectStageHolder
{
    <span>public</span> <span>static</span> <span>final</span> class CustomProjectStage <span>extends</span> ProjectStage
    {
        <span>private</span> <span>static</span> <span>final</span> <span>long</span> serialVersionUID = 1029094387976167179L;
    }

    <span>public</span> <span>static</span> <span>final</span> CustomProjectStage CustomProjectStage = <span>new</span> CustomProjectStage();
}</pre><pre><br></pre><pre><font face="arial, helvetica, sans-serif">And consider then following statements:</font></pre><pre><div><pre class="code-java"><font face="arial, helvetica, sans-serif">JavaResource javaResource = factory.getResourceFrom(new File(&quot;/path/to/file/RudyHolder.java&quot;)).reify(JavaResource.class);</font></pre>
<pre class="code-java"><font face="arial, helvetica, sans-serif">javaResource.getJavaSource().getQualifiedName();</font></pre><pre class="code-java"><font face="arial, helvetica, sans-serif"><br></font></pre><pre class="code-java">
<font face="arial, helvetica, sans-serif">The javaResource is indeed pointing to the file, you can verify with javaResource.getFullyQualifiedName()</font></pre><pre class="code-java"><font face="arial, helvetica, sans-serif">But if you ask for the javaSource, as in the second statement, you get the nested class, CustomProjectStage in our example.</font></pre>
<pre class="code-java"><font face="arial, helvetica, sans-serif"><br></font></pre><pre class="code-java"><font face="arial, helvetica, sans-serif">Relation between JavaResource and JavaSource indicates that multiple classes per java file wasn&#39;t considered.  And isn&#39;t common for entity classes etc that have to be handled by Forge.</font></pre>
<pre class="code-java"><font face="arial, helvetica, sans-serif">So when there are no plans in supporting this in Forge, isn&#39;t it logic to return the main class, instead of the nested class?</font></pre><pre class="code-java">
<font face="arial, helvetica, sans-serif"><br></font></pre><pre class="code-java"><font face="arial, helvetica, sans-serif">Thx for the clarification.</font></pre><pre class="code-java"><font face="arial, helvetica, sans-serif"><br>
</font></pre><pre class="code-java"><font face="arial, helvetica, sans-serif">Regards</font></pre><pre class="code-java"><font face="arial, helvetica, sans-serif">Rudy</font></pre><pre class="code-java"><font face="arial, helvetica, sans-serif"><br>
</font></pre><pre class="code-java">-- </pre></div></pre>Rudy De Busscher<br><a href="http://www.c4j.be" target="_blank">http://www.c4j.be</a><br>
<br>
</div>