PageRenderTime 35ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/java/template_default_class_parms_runme.java

#
Java | 50 lines | 44 code | 6 blank | 0 comment | 0 complexity | 88d5da78cd172248242d7dd996eb29ca MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. import template_default_class_parms.*;
  2. public class template_default_class_parms_runme {
  3. static {
  4. try {
  5. System.loadLibrary("template_default_class_parms");
  6. } catch (UnsatisfiedLinkError e) {
  7. 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);
  8. System.exit(1);
  9. }
  10. }
  11. public static void main(String argv[]) {
  12. {
  13. DefaultBar bar = new DefaultBar(20.0, new SomeType(), 10);
  14. double d = bar.getCType();
  15. bar.setCType(d);
  16. SomeType s = bar.getDType();
  17. bar.setDType(s);
  18. int i = bar.getEType();
  19. bar.setEType(i);
  20. d = bar.method(d, s, i);
  21. }
  22. {
  23. DefaultFoo foo = new DefaultFoo(new SomeType());
  24. SomeType s = foo.getTType();
  25. s = foo.method(s);
  26. }
  27. {
  28. BarAnotherTypeBool bar = new BarAnotherTypeBool(new AnotherType(), true, 10);
  29. AnotherType a = bar.getCType();
  30. bar.setCType(a);
  31. boolean b = bar.getDType();
  32. bar.setDType(b);
  33. int i = bar.getEType();
  34. bar.setEType(i);
  35. a = bar.method(a, b, i);
  36. }
  37. {
  38. FooAnotherType foo = new FooAnotherType(new AnotherType());
  39. AnotherType a = foo.getTType();
  40. foo.setTType(a);
  41. a = foo.method(a);
  42. }
  43. }
  44. }