From 8a7d12435efb592e0a7e9b035137865854898904 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sun, 27 Jun 2004 21:02:38 +0000 Subject: [PATCH] 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/SWIG@6001 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/java/java.swg | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Lib/java/java.swg b/Lib/java/java.swg index a56dfc4a4..f4d54d212 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -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"