Assuming I have nested.i like :
%typemap(javaimports) Outer "
/**
* Outer class
*/"
%typemap(javaimports) Outer::Inner "
/**
* Outer::Inner class
*/"
%javamethodmodifiers Outer::outer_method(int) "
/**
* Outer::outer_method(int)
*/
public";
%javamethodmodifiers Outer::Inner::inner_method(int) "
/**
* Outer::Inner::inner_method(int)
*/
public";
struct Outer {
int outer_method(int);
struct Inner {
int inner_method(int);
};
};
and trying to generate Java like
$ swig -java -c++ -module Sample nested.i
As a result 3 import and modifiers are appeared except Outer::Inner class.
Environment: MS Windows 7
$ swig -version
SWIG Version 3.0.7
Compiled with i586-mingw32msvc-g++ [i586-pc-mingw32msvc]
Configured options: +pcre
Please see http://www.swig.org for reporting bugs and further information
javaimportsdo add code to import section, and while you are wrapping nested class, it is located inside single file and share same includes.javaimportsfor nested class is ignored.personally for class documentation i use
javaclassmodifierslike so:in case of inner class it generates:
which is not that very nice, it compiles, but javadoc is not generated for that class.