phax / jcodemodel

A heavily extended fork of the com.sun.codemodel (from 2013/09)
Other
92 stars 34 forks source link

Referencing inner classes #5

Closed sviperll closed 10 years ago

sviperll commented 10 years ago

In current version of jcodemodel all inner classes are explicitly imported. This is incorrect:

package pkg;

// This is incorrect: you can't import private inner classes!!!
import pkg.SomeClass.SomeInnerClass;

class SomeClass {
    SomeInnerClass field1;

    private static class SomeInnerClass {
    };
}

You can always use SomeClass.SomeInnerClass to reference to inner-class instead of bare SomeInnerClass

The example above will become:

package pkg;

class SomeClass {
    SomeClass.SomeInnerClass field1;

    private static class SomeInnerClass {
    };
}
sviperll commented 10 years ago

com.sun.codemodel-2.6 has correcty handled this issue.

phax commented 10 years ago

I will look at it - I think that has potentially to do with the method generification...

phax commented 10 years ago

Fixed in trunk - please check. I will wait with the next release for additional bugs you find :)