/trunk/Examples/test-suite/java/director_unroll_runme.java
Java | 34 lines | 24 code | 10 blank | 0 comment | 1 complexity | df593e8b78d5746b61700151ca9d2b0a MD5 | raw file
1 2import director_unroll.*; 3 4public class director_unroll_runme { 5 6 static { 7 try { 8 System.loadLibrary("director_unroll"); 9 } catch (UnsatisfiedLinkError e) { 10 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); 11 System.exit(1); 12 } 13 } 14 15 public static void main(String argv[]) { 16 17 director_unroll_MyFoo a = new director_unroll_MyFoo(); 18 19 Bar b = new Bar(); 20 21 b.set(a); 22 Foo c = b.get(); 23 24 if (!c.ping().equals("director_unroll_MyFoo::ping()")) 25 throw new RuntimeException ( "c.ping()" ); 26 } 27} 28 29class director_unroll_MyFoo extends Foo { 30 public String ping() { 31 return "director_unroll_MyFoo::ping()"; 32 } 33} 34