Support for %javaconstvalue added (better compile time constants)

Support for %feature("except", throws="ExceptionClass") so that any Java exception classes thrown from JNI code can be added to the throws list - handled in the same way as the 'throws' attribute in typemaps -
macros added for this - %javaexception and %nojavaexception


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6001 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-06-27 21:02:38 +00:00
commit 1ed50b305b

View file

@ -693,7 +693,8 @@
""
%typecheck(SWIG_TYPECHECK_INT128) /* Java BigInteger */
unsigned long long
unsigned long long,
const unsigned long long &
""
%typecheck(SWIG_TYPECHECK_FLOAT) /* Java float */
@ -960,9 +961,12 @@
}
/* Java specific directives */
#define %javaconst(flag) %feature("java:const","flag")
#define %javaenum(wrapapproach) %feature("java:enum","wrapapproach")
#define %javamethodmodifiers %feature("java:methodmodifiers")
#define %javaconst(flag) %feature("java:const","flag")
#define %javaconstvalue(value) %feature("java:constvalue",value)
#define %javaenum(wrapapproach) %feature("java:enum","wrapapproach")
#define %javamethodmodifiers %feature("java:methodmodifiers")
#define %javaexception(exceptionclasses) %feature("except",throws=exceptionclasses)
#define %nojavaexception %feature("except","",throws="")
%pragma(java) jniclassclassmodifiers="class"
%pragma(java) moduleclassmodifiers="public class"