< prev index next >

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

Print this page




  47 #ifdef __cplusplus
  48 extern "C" {
  49 #endif
  50 
  51 /*
  52  * JNI Types
  53  */
  54 
  55 #ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
  56 
  57 typedef unsigned char   jboolean;
  58 typedef unsigned short  jchar;
  59 typedef short           jshort;
  60 typedef float           jfloat;
  61 typedef double          jdouble;
  62 
  63 typedef jint            jsize;
  64 
  65 #ifdef __cplusplus
  66 

  67 class _jobject {};
  68 class _jclass : public _jobject {};
  69 class _jthrowable : public _jobject {};
  70 class _jstring : public _jobject {};
  71 class _jarray : public _jobject {};
  72 class _jbooleanArray : public _jarray {};
  73 class _jbyteArray : public _jarray {};
  74 class _jcharArray : public _jarray {};
  75 class _jshortArray : public _jarray {};
  76 class _jintArray : public _jarray {};
  77 class _jlongArray : public _jarray {};
  78 class _jfloatArray : public _jarray {};
  79 class _jdoubleArray : public _jarray {};
  80 class _jobjectArray : public _jarray {};
  81 

  82 typedef _jobject *jobject;
  83 typedef _jclass *jclass;
  84 typedef _jthrowable *jthrowable;
  85 typedef _jstring *jstring;
  86 typedef _jarray *jarray;
  87 typedef _jbooleanArray *jbooleanArray;
  88 typedef _jbyteArray *jbyteArray;
  89 typedef _jcharArray *jcharArray;
  90 typedef _jshortArray *jshortArray;
  91 typedef _jintArray *jintArray;
  92 typedef _jlongArray *jlongArray;
  93 typedef _jfloatArray *jfloatArray;
  94 typedef _jdoubleArray *jdoubleArray;
  95 typedef _jobjectArray *jobjectArray;
  96 
  97 #else
  98 

  99 struct _jobject;
 100 

 101 typedef struct _jobject *jobject;
 102 typedef jobject jclass;
 103 typedef jobject jthrowable;
 104 typedef jobject jstring;
 105 typedef jobject jarray;
 106 typedef jarray jbooleanArray;
 107 typedef jarray jbyteArray;
 108 typedef jarray jcharArray;
 109 typedef jarray jshortArray;
 110 typedef jarray jintArray;
 111 typedef jarray jlongArray;
 112 typedef jarray jfloatArray;
 113 typedef jarray jdoubleArray;
 114 typedef jarray jobjectArray;
 115 
 116 #endif
 117 
 118 typedef jobject jweak;
 119 
 120 typedef union jvalue {
 121     jboolean z;
 122     jbyte    b;
 123     jchar    c;
 124     jshort   s;
 125     jint     i;
 126     jlong    j;
 127     jfloat   f;
 128     jdouble  d;
 129     jobject  l;

 130 } jvalue;
 131 
 132 struct _jfieldID;
 133 typedef struct _jfieldID *jfieldID;
 134 
 135 struct _jmethodID;
 136 typedef struct _jmethodID *jmethodID;
 137 
 138 /* Return values from jobjectRefType */
 139 typedef enum _jobjectType {
 140      JNIInvalidRefType    = 0,
 141      JNILocalRefType      = 1,
 142      JNIGlobalRefType     = 2,
 143      JNIWeakGlobalRefType = 3
 144 } jobjectRefType;
 145 
 146 
 147 #endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
 148 
 149 /*




  47 #ifdef __cplusplus
  48 extern "C" {
  49 #endif
  50 
  51 /*
  52  * JNI Types
  53  */
  54 
  55 #ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
  56 
  57 typedef unsigned char   jboolean;
  58 typedef unsigned short  jchar;
  59 typedef short           jshort;
  60 typedef float           jfloat;
  61 typedef double          jdouble;
  62 
  63 typedef jint            jsize;
  64 
  65 #ifdef __cplusplus
  66 
  67 class _jvaluetype {};
  68 class _jobject {};
  69 class _jclass : public _jobject {};
  70 class _jthrowable : public _jobject {};
  71 class _jstring : public _jobject {};
  72 class _jarray : public _jobject {};
  73 class _jbooleanArray : public _jarray {};
  74 class _jbyteArray : public _jarray {};
  75 class _jcharArray : public _jarray {};
  76 class _jshortArray : public _jarray {};
  77 class _jintArray : public _jarray {};
  78 class _jlongArray : public _jarray {};
  79 class _jfloatArray : public _jarray {};
  80 class _jdoubleArray : public _jarray {};
  81 class _jobjectArray : public _jarray {};
  82 
  83 typedef _jvaluetype *jvaluetype;
  84 typedef _jobject *jobject;
  85 typedef _jclass *jclass;
  86 typedef _jthrowable *jthrowable;
  87 typedef _jstring *jstring;
  88 typedef _jarray *jarray;
  89 typedef _jbooleanArray *jbooleanArray;
  90 typedef _jbyteArray *jbyteArray;
  91 typedef _jcharArray *jcharArray;
  92 typedef _jshortArray *jshortArray;
  93 typedef _jintArray *jintArray;
  94 typedef _jlongArray *jlongArray;
  95 typedef _jfloatArray *jfloatArray;
  96 typedef _jdoubleArray *jdoubleArray;
  97 typedef _jobjectArray *jobjectArray;
  98 
  99 #else
 100 
 101 struct _jvaluetype;
 102 struct _jobject;
 103 
 104 typedef struct _jvaluetype *jvaluetype;
 105 typedef struct _jobject *jobject;
 106 typedef jobject jclass;
 107 typedef jobject jthrowable;
 108 typedef jobject jstring;
 109 typedef jobject jarray;
 110 typedef jarray jbooleanArray;
 111 typedef jarray jbyteArray;
 112 typedef jarray jcharArray;
 113 typedef jarray jshortArray;
 114 typedef jarray jintArray;
 115 typedef jarray jlongArray;
 116 typedef jarray jfloatArray;
 117 typedef jarray jdoubleArray;
 118 typedef jarray jobjectArray;
 119 
 120 #endif
 121 
 122 typedef jobject jweak;
 123 
 124 typedef union jvalue {
 125     jboolean z;
 126     jbyte    b;
 127     jchar    c;
 128     jshort   s;
 129     jint     i;
 130     jlong    j;
 131     jfloat   f;
 132     jdouble  d;
 133     jobject  l;
 134     jvaluetype q;
 135 } jvalue;
 136 
 137 struct _jfieldID;
 138 typedef struct _jfieldID *jfieldID;
 139 
 140 struct _jmethodID;
 141 typedef struct _jmethodID *jmethodID;
 142 
 143 /* Return values from jobjectRefType */
 144 typedef enum _jobjectType {
 145      JNIInvalidRefType    = 0,
 146      JNILocalRefType      = 1,
 147      JNIGlobalRefType     = 2,
 148      JNIWeakGlobalRefType = 3
 149 } jobjectRefType;
 150 
 151 
 152 #endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
 153 
 154 /*


< prev index next >