Hi All,

Seems that nested classes aren't handled correctly by forge.

If you have a java source file like this

public class CustomProjectStageHolder implements ProjectStageHolder
{
    public static final class CustomProjectStage extends ProjectStage
    {
        private static final long serialVersionUID = 1029094387976167179L;
    }

    public static final CustomProjectStage CustomProjectStage = new CustomProjectStage();
}

And consider then following statements:
JavaResource javaResource = factory.getResourceFrom(new File("/path/to/file/RudyHolder.java")).reify(JavaResource.class);
javaResource.getJavaSource().getQualifiedName();

The javaResource is indeed pointing to the file, you can verify with javaResource.getFullyQualifiedName()
But if you ask for the javaSource, as in the second statement, you get the nested class, CustomProjectStage in our example.

Relation between JavaResource and JavaSource indicates that multiple classes per java file wasn't considered.  And isn't common for entity classes etc that have to be handled by Forge.
So when there are no plans in supporting this in Forge, isn't it logic to return the main class, instead of the nested class?

Thx for the clarification.

Regards
Rudy

-- 
Rudy De Busscher
http://www.c4j.be