diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2008-05-14 22:09:08 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2008-05-14 22:09:08 +0000 |
commit | b18861a37429e63b061b38dc40c092b2566a880b (patch) | |
tree | b1f5bd29bc172b209c819836ed75d8bc946ed726 /Examples/test-suite/intermediary_classname.i | |
parent | 20954f9bdc1385e80c36410fd0cae7e87f8a252a (diff) | |
download | swig-b18861a37429e63b061b38dc40c092b2566a880b.tar.gz |
Correct checked exceptions specified in the throws typemap for javadirectorin and javadirectorout typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10448 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/intermediary_classname.i')
-rw-r--r-- | Examples/test-suite/intermediary_classname.i | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Examples/test-suite/intermediary_classname.i b/Examples/test-suite/intermediary_classname.i index 9d7a88df0..5becc4356 100644 --- a/Examples/test-suite/intermediary_classname.i +++ b/Examples/test-suite/intermediary_classname.i @@ -11,6 +11,14 @@ %feature("director") Base; %feature("director") Derived; +// Test the throws attribute in these typemaps +%typemap(javadirectorout, throws="RuntimeException/*javadirectorout Base&*/") Base& + "$javaclassname.getCPtr($javacall)/* XYZ& typemap directorout*/" +%typemap(javadirectorin, throws="Throwable/*javadirectorin Base&*/") Base& + "new $javaclassname($jniinput, false)/*javadirectorin*/" +%typemap(out, throws="IllegalAccessException/*out Base&*/") Base& { + // XYZ& typemap out +} %inline %{ template<class T> T maximum(const T a, const T b) { return a>b ? a : b; } @@ -42,6 +50,7 @@ public: Base(Base *b) : mVectInt(0) {} virtual ~Base() {} virtual Base& m1(Base &b) { return b; } + virtual Base& m1out() { static Base b; return b; } virtual Base* m2(Base *b) { return b; } // virtual Base m3(Base b) { return b; } vector<int> mVectInt; |