24 which provides support for JNI tests and accessing JNI environment.
25
26 Source files:
27 jni_tools.h
28 jni_tools.c
29
30 Naming conventions:
31 macroses: NSK_JNI_*
32 functions: nsk_JNI_*
33
34 ---------------------------------------------------------------------------------
35
36 jni_tools.h
37
38 Provides functions and macroses for invocation of JNI functions
39 and checking JNI errors and pending exceptions:
40
41 NSK_JNI_VERIFY(jni, action)
42 NSK_JNI_VERIFY_NEGATIVE(jni, action)
43
44 Typical example of usage of NSK_JNI_VERIFY and NSK_CPP_STUB macroses
45 for invokation of JNI functions:
46
47 // jni->FindClass(jni, class_name)
48 if (!NSK_JNI_VERIFY(jni,
49 jni->FindClass(class_name) != NULL)) {
50 return JNI_ERR;
51 }
52
53 or with saving obtained data:
54
55 // cls = jni->FindClass(jni, class_name)
56 if (!NSK_JNI_VERIFY(jni, (cls =
57 jni->FindClass(class_name)) != NULL)) {
58 return JNI_ERR;
59 }
60
61 ---------------------------------------------------------------------------------
|
24 which provides support for JNI tests and accessing JNI environment.
25
26 Source files:
27 jni_tools.h
28 jni_tools.c
29
30 Naming conventions:
31 macroses: NSK_JNI_*
32 functions: nsk_JNI_*
33
34 ---------------------------------------------------------------------------------
35
36 jni_tools.h
37
38 Provides functions and macroses for invocation of JNI functions
39 and checking JNI errors and pending exceptions:
40
41 NSK_JNI_VERIFY(jni, action)
42 NSK_JNI_VERIFY_NEGATIVE(jni, action)
43
44 Typical example of usage of the NSK_JNI_VERIFY macro
45 for invokation of JNI functions:
46
47 // jni->FindClass(jni, class_name)
48 if (!NSK_JNI_VERIFY(jni,
49 jni->FindClass(class_name) != NULL)) {
50 return JNI_ERR;
51 }
52
53 or with saving obtained data:
54
55 // cls = jni->FindClass(jni, class_name)
56 if (!NSK_JNI_VERIFY(jni, (cls =
57 jni->FindClass(class_name)) != NULL)) {
58 return JNI_ERR;
59 }
60
61 ---------------------------------------------------------------------------------
|