PageRenderTime 20ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms 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
 1
 2
 3import template_default_class_parms.*;
 4
 5public class template_default_class_parms_runme {
 6
 7  static {
 8    try {
 9	System.loadLibrary("template_default_class_parms");
10    } catch (UnsatisfiedLinkError e) {
11      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);
12      System.exit(1);
13    }
14  }
15
16  public static void main(String argv[]) {
17    {
18      DefaultBar bar = new DefaultBar(20.0, new SomeType(), 10);
19      double d = bar.getCType();
20      bar.setCType(d);
21      SomeType s = bar.getDType();
22      bar.setDType(s);
23      int i = bar.getEType();
24      bar.setEType(i);
25      d = bar.method(d, s, i);
26    }
27    {
28      DefaultFoo foo = new DefaultFoo(new SomeType());
29      SomeType s = foo.getTType();
30      s = foo.method(s);
31    }
32    {
33      BarAnotherTypeBool bar = new BarAnotherTypeBool(new AnotherType(), true, 10);
34      AnotherType a = bar.getCType();
35      bar.setCType(a);
36      boolean b = bar.getDType();
37      bar.setDType(b);
38      int i = bar.getEType();
39      bar.setEType(i);
40      a = bar.method(a, b, i);
41    }
42    {
43      FooAnotherType foo = new FooAnotherType(new AnotherType());
44      AnotherType a = foo.getTType();
45      foo.setTType(a);
46      a = foo.method(a);
47    }
48  }
49}
50