MCPcopy Index your code
hub / github.com/java-native-access/jna / DirectTest

Class DirectTest

test/com/sun/jna/DirectTest.java:41–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40//@SuppressWarnings("unused")
41public class DirectTest extends TestCase implements Paths {
42
43 public static void main(java.lang.String[] argList) {
44 junit.textui.TestRunner.run(DirectTest.class);
45 }
46
47 static class MathLibrary {
48
49 public static native double cos(double x);
50
51 static {
52 Native.register(Platform.MATH_LIBRARY_NAME);
53 }
54 }
55
56 interface MathInterface extends Library {
57 double cos(double x);
58 }
59
60 static class CLibrary {
61 public static class size_t extends IntegerType {
62 private static final long serialVersionUID = 1L;
63
64 public size_t() {
65 super(Native.POINTER_SIZE);
66 }
67 public size_t(long value) {
68 super(Native.POINTER_SIZE, value);
69 }
70 }
71
72 public static native Pointer memset(Pointer p, int v, size_t len);
73 public static native Pointer memset(Pointer p, int v, int len);
74 public static native Pointer memset(Pointer p, int v, long len);
75 public static native long memset(long p, int v, long len);
76 public static native int memset(int p, int v, int len);
77 public static native int strlen(String s1);
78 public static native int strlen(Pointer p);
79 public static native int strlen(byte[] b);
80
81 static {
82 Native.register(Platform.C_LIBRARY_NAME);
83 }
84 }
85
86 static interface CInterface extends Library {
87 Pointer memset(Pointer p, int v, int len);
88 int strlen(String s);
89 }
90
91 static interface TestInterface extends Library {
92 interface Int32Callback extends Callback {
93 int invoke(int arg1, int arg2);
94 }
95 interface NativeLongCallback extends Callback {
96 NativeLong invoke(NativeLong arg1, NativeLong arg2);
97 }
98 int callInt32CallbackRepeatedly(Int32Callback cb, int arg1, int arg2, int count);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…