< prev index next >

src/java.base/share/native/include/jni.h

Print this page

 753 
 754     jboolean (JNICALL *ExceptionCheck)
 755        (JNIEnv *env);
 756 
 757     jobject (JNICALL *NewDirectByteBuffer)
 758        (JNIEnv* env, void* address, jlong capacity);
 759     void* (JNICALL *GetDirectBufferAddress)
 760        (JNIEnv* env, jobject buf);
 761     jlong (JNICALL *GetDirectBufferCapacity)
 762        (JNIEnv* env, jobject buf);
 763 
 764     /* New JNI 1.6 Features */
 765 
 766     jobjectRefType (JNICALL *GetObjectRefType)
 767         (JNIEnv* env, jobject obj);
 768 
 769     /* Module Features */
 770 
 771     jobject (JNICALL *GetModule)
 772        (JNIEnv* env, jclass clazz);

 773 };
 774 
 775 /*
 776  * We use inlined functions for C++ so that programmers can write:
 777  *
 778  *    env->FindClass("java/lang/String")
 779  *
 780  * in C++ rather than:
 781  *
 782  *    (*env)->FindClass(env, "java/lang/String")
 783  *
 784  * in C.
 785  */
 786 
 787 struct JNIEnv_ {
 788     const struct JNINativeInterface_ *functions;
 789 #ifdef __cplusplus
 790 
 791     jint GetVersion() {
 792         return functions->GetVersion(this);

 753 
 754     jboolean (JNICALL *ExceptionCheck)
 755        (JNIEnv *env);
 756 
 757     jobject (JNICALL *NewDirectByteBuffer)
 758        (JNIEnv* env, void* address, jlong capacity);
 759     void* (JNICALL *GetDirectBufferAddress)
 760        (JNIEnv* env, jobject buf);
 761     jlong (JNICALL *GetDirectBufferCapacity)
 762        (JNIEnv* env, jobject buf);
 763 
 764     /* New JNI 1.6 Features */
 765 
 766     jobjectRefType (JNICALL *GetObjectRefType)
 767         (JNIEnv* env, jobject obj);
 768 
 769     /* Module Features */
 770 
 771     jobject (JNICALL *GetModule)
 772        (JNIEnv* env, jclass clazz);
 773 
 774 };
 775 
 776 /*
 777  * We use inlined functions for C++ so that programmers can write:
 778  *
 779  *    env->FindClass("java/lang/String")
 780  *
 781  * in C++ rather than:
 782  *
 783  *    (*env)->FindClass(env, "java/lang/String")
 784  *
 785  * in C.
 786  */
 787 
 788 struct JNIEnv_ {
 789     const struct JNINativeInterface_ *functions;
 790 #ifdef __cplusplus
 791 
 792     jint GetVersion() {
 793         return functions->GetVersion(this);
< prev index next >