Merge branch 'alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java'
* alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java: Enhance cpp11_strongly_typed_enumerations testcase and turn it on Simplify/improve strongly typed enum implementation for Java Rewrite some Java director nested class support code for strongly typed enums Expand director_nested_class test to test more than one level of nesting Add director_nested_class testcase Removed useless code (it does not affect output, at least on our testcases) Java/Fix: swig_connect_director used not-fully-qualified classname (proper) Java/Fix: swig_connect_director used not-fully-qualified classname Java: fix generation of ProxyName when JNI descriptor is requested - for inner classes '$' should be used as separator instead of '/' Java: fix invalid director 'self' variable type name (wasn't fully qualified) Clean-up test suite and fix issue with nspace, as well as keep the fix for Class::Struct::EnumClass being JNI-referenced as Struct_EnumClass C++11 strongly-typed enums fix for Java only (proper) Revert "C++11 strongly-typed enums fix for Java only" Additional test cases for C++11 strongly-typed enums C++11 strongly-typed enums fix for Java only
This commit is contained in:
commit
296d45aec5
7 changed files with 245 additions and 34 deletions
41
Examples/test-suite/java/director_nested_class_runme.java
Normal file
41
Examples/test-suite/java/director_nested_class_runme.java
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
import director_nested_class.*;
|
||||
|
||||
public class director_nested_class_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("director_nested_class");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String argv[]) {
|
||||
|
||||
director_nested_class_Derived d = new director_nested_class_Derived();
|
||||
|
||||
if (DirectorOuter.callMethod(d, 999) != 9990) {
|
||||
throw new RuntimeException("callMethod(999) failed");
|
||||
}
|
||||
|
||||
director_nested_class_DerivedInnerInner dinner = new director_nested_class_DerivedInnerInner();
|
||||
|
||||
if (DirectorOuter.callInnerInnerMethod(dinner, 999) != 999000) {
|
||||
throw new RuntimeException("callMethod(999) failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class director_nested_class_Derived extends DirectorOuter.DirectorInner {
|
||||
public int vmethod(int input) {
|
||||
return input * 10;
|
||||
}
|
||||
}
|
||||
|
||||
class director_nested_class_DerivedInnerInner extends DirectorOuter.DirectorInner.DirectorInnerInner {
|
||||
public int innervmethod(int input) {
|
||||
return input * 1000;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue