jaxb-codemodel icon indicating copy to clipboard operation
jaxb-codemodel copied to clipboard

No modifiers for root package class

Open glassfishrobot opened this issue 10 years ago • 3 comments

if we pass class name with no package to constructor JCodeModel._class and use modifier (final or abstract), they will be skipped

**Bar.java**    public JDefinedClass _class(int mods, String fullyqualifiedName,ClassType t) throws JClassAlreadyExistsException {
        int idx = fullyqualifiedName.lastIndexOf('.');
        if( idx<0 )     return rootPackage()._class(fullyqualifiedName);
        else
            return _package(fullyqualifiedName.substring(0,idx))
._class(mods, fullyqualifiedName.substring(idx+1), t );
    }

Affected Versions

[2.4]

glassfishrobot avatar Mar 20 '14 08:03 glassfishrobot

Reported by anisimovt

glassfishrobot avatar Mar 20 '14 08:03 glassfishrobot

phax said: This issue has been fixed in https://github.com/phax/jcodemodel if you are still interested

glassfishrobot avatar Apr 21 '16 09:04 glassfishrobot

This issue was imported from java.net JIRA CODEMODEL-23

glassfishrobot avatar Apr 24 '17 07:04 glassfishrobot