Q:

Is there a way to control visibility of the SWIG generated JNI class?

By default, SWIG generates the JNI class with public visibility.  Is there a way to specify that the JNI class is only accessible within the package? 

A:

I found a solution.  The following will set the visibility to just the package:
%pragma(java) jniclassclassmodifiers="class"

See:
http://www.swig.org/Doc2.0/Java.html#Java_imclass_pragmas

