I am using SWIG to generate a Java wrapper for some C code. This C code has some constants that SWIG represents with the below Java interface file. As one can see, this interface can be accessed by classes that do not belong to package abc
given that it is declared as public
. How can one declare this interface as only visible to the classes that belong to the same package using SWIG (i.e. change public interface TestConstants
to interface TestConstants
)?
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package abc;
public interface TestConstants {
public final static int YES = TestJNI.YES_get();
public final static int NO = TestJNI.NO_get();
public final static int ENABLED = TestJNI.ENABLED_get();
public final static int DISABLED = TesJNI.DISABLED_get();
}