Ian Rogers | df20fe0 | 2011-07-20 20:34:16 -0700 | [diff] [blame] | 1 | // Copyright 2011 Google Inc. All Rights Reserved. |
| 2 | |
Brian Carlstrom | 578bbdc | 2011-07-21 14:07:47 -0700 | [diff] [blame] | 3 | #include "jni_internal.h" |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 4 | |
| 5 | #include <vector> |
| 6 | #include <utility> |
| 7 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 8 | #include "class_linker.h" |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 9 | #include "jni.h" |
Brian Carlstrom | 578bbdc | 2011-07-21 14:07:47 -0700 | [diff] [blame] | 10 | #include "logging.h" |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 11 | #include "runtime.h" |
Carl Shapiro | fc322c7 | 2011-07-27 00:20:01 -0700 | [diff] [blame] | 12 | #include "scoped_ptr.h" |
| 13 | #include "stringpiece.h" |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 14 | #include "thread.h" |
Ian Rogers | df20fe0 | 2011-07-20 20:34:16 -0700 | [diff] [blame] | 15 | |
| 16 | namespace art { |
| 17 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 18 | jint GetVersion(JNIEnv* env) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 19 | return JNI_VERSION_1_6; |
| 20 | } |
| 21 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 22 | jclass DefineClass(JNIEnv *env, const char *name, |
| 23 | jobject loader, const jbyte *buf, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 24 | LOG(FATAL) << "Unimplemented"; |
| 25 | return NULL; |
| 26 | } |
| 27 | |
Elliott Hughes | 6b43685 | 2011-08-12 10:16:44 -0700 | [diff] [blame^] | 28 | // Section 12.3.2 of the JNI spec describes JNI class descriptors. They're |
| 29 | // separated with slashes but aren't wrapped with "L;" like regular descriptors |
| 30 | // (i.e. "a/b/C" rather than "La/b/C;"). Arrays of reference types are an |
| 31 | // exception; there the "L;" must be present ("[La/b/C;"). Historically we've |
| 32 | // supported names with dots too (such as "a.b.C"). |
| 33 | std::string NormalizeJniClassDescriptor(const char* name) { |
| 34 | std::string result; |
| 35 | // Add the missing "L;" if necessary. |
| 36 | if (name[0] == '[') { |
| 37 | result = name; |
| 38 | } else { |
| 39 | result += 'L'; |
| 40 | result += name; |
| 41 | result += ';'; |
| 42 | } |
| 43 | // Rewrite '.' as '/' for backwards compatibility. |
| 44 | for (size_t i = 0; i < result.size(); ++i) { |
| 45 | if (result[i] == '.') { |
| 46 | result[i] = '/'; |
| 47 | } |
| 48 | } |
| 49 | return result; |
| 50 | } |
| 51 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 52 | jclass FindClass(JNIEnv* env, const char* name) { |
| 53 | ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); |
Elliott Hughes | 6b43685 | 2011-08-12 10:16:44 -0700 | [diff] [blame^] | 54 | std::string descriptor(NormalizeJniClassDescriptor(name)); |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 55 | // TODO: need to get the appropriate ClassLoader. |
Elliott Hughes | 6b43685 | 2011-08-12 10:16:44 -0700 | [diff] [blame^] | 56 | Class* c = class_linker->FindClass(descriptor, NULL); |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 57 | // TODO: local reference. |
| 58 | return reinterpret_cast<jclass>(c); |
| 59 | } |
| 60 | |
| 61 | jmethodID FromReflectedMethod(JNIEnv* env, jobject method) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 62 | LOG(FATAL) << "Unimplemented"; |
| 63 | return NULL; |
| 64 | } |
| 65 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 66 | jfieldID FromReflectedField(JNIEnv* env, jobject field) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 67 | LOG(FATAL) << "Unimplemented"; |
| 68 | return NULL; |
| 69 | } |
| 70 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 71 | jobject ToReflectedMethod(JNIEnv* env, jclass cls, |
| 72 | jmethodID methodID, jboolean isStatic) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 73 | LOG(FATAL) << "Unimplemented"; |
| 74 | return NULL; |
| 75 | } |
| 76 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 77 | jclass GetSuperclass(JNIEnv* env, jclass sub) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 78 | LOG(FATAL) << "Unimplemented"; |
| 79 | return NULL; |
| 80 | } |
| 81 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 82 | jboolean IsAssignableFrom(JNIEnv* env, jclass sub, jclass sup) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 83 | LOG(FATAL) << "Unimplemented"; |
| 84 | return JNI_FALSE; |
| 85 | } |
| 86 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 87 | jobject ToReflectedField(JNIEnv* env, jclass cls, |
| 88 | jfieldID fieldID, jboolean isStatic) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 89 | LOG(FATAL) << "Unimplemented"; |
| 90 | return NULL; |
| 91 | } |
| 92 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 93 | jint Throw(JNIEnv* env, jthrowable obj) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 94 | LOG(FATAL) << "Unimplemented"; |
| 95 | return 0; |
| 96 | } |
| 97 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 98 | jint ThrowNew(JNIEnv* env, jclass clazz, const char* msg) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 99 | LOG(FATAL) << "Unimplemented"; |
| 100 | return 0; |
| 101 | } |
| 102 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 103 | jthrowable ExceptionOccurred(JNIEnv* env) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 104 | LOG(FATAL) << "Unimplemented"; |
| 105 | return NULL; |
| 106 | } |
| 107 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 108 | void ExceptionDescribe(JNIEnv* env) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 109 | LOG(FATAL) << "Unimplemented"; |
| 110 | } |
| 111 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 112 | void ExceptionClear(JNIEnv* env) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 113 | LOG(FATAL) << "Unimplemented"; |
| 114 | } |
| 115 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 116 | void FatalError(JNIEnv* env, const char* msg) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 117 | LOG(FATAL) << "Unimplemented"; |
| 118 | } |
| 119 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 120 | jint PushLocalFrame(JNIEnv* env, jint cap) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 121 | LOG(FATAL) << "Unimplemented"; |
| 122 | return 0; |
| 123 | } |
| 124 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 125 | jobject PopLocalFrame(JNIEnv* env, jobject res) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 126 | LOG(FATAL) << "Unimplemented"; |
| 127 | return NULL; |
| 128 | } |
| 129 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 130 | jobject NewGlobalRef(JNIEnv* env, jobject lobj) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 131 | LOG(FATAL) << "Unimplemented"; |
| 132 | return NULL; |
| 133 | } |
| 134 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 135 | void DeleteGlobalRef(JNIEnv* env, jobject gref) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 136 | LOG(FATAL) << "Unimplemented"; |
| 137 | } |
| 138 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 139 | void DeleteLocalRef(JNIEnv* env, jobject obj) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 140 | LOG(FATAL) << "Unimplemented"; |
| 141 | } |
| 142 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 143 | jboolean IsSameObject(JNIEnv* env, jobject obj1, jobject obj2) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 144 | LOG(FATAL) << "Unimplemented"; |
| 145 | return JNI_FALSE; |
| 146 | } |
| 147 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 148 | jobject NewLocalRef(JNIEnv* env, jobject ref) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 149 | LOG(FATAL) << "Unimplemented"; |
| 150 | return NULL; |
| 151 | } |
| 152 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 153 | jint EnsureLocalCapacity(JNIEnv* env, jint) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 154 | LOG(FATAL) << "Unimplemented"; |
| 155 | return 0; |
| 156 | } |
| 157 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 158 | jobject AllocObject(JNIEnv* env, jclass clazz) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 159 | LOG(FATAL) << "Unimplemented"; |
| 160 | return NULL; |
| 161 | } |
| 162 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 163 | jobject NewObject(JNIEnv* env, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 164 | LOG(FATAL) << "Unimplemented"; |
| 165 | return NULL; |
| 166 | } |
| 167 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 168 | jobject NewObjectV(JNIEnv* env, |
| 169 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 170 | LOG(FATAL) << "Unimplemented"; |
| 171 | return NULL; |
| 172 | } |
| 173 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 174 | jobject NewObjectA(JNIEnv* env, |
| 175 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 176 | LOG(FATAL) << "Unimplemented"; |
| 177 | return NULL; |
| 178 | } |
| 179 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 180 | jclass GetObjectClass(JNIEnv* env, jobject obj) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 181 | LOG(FATAL) << "Unimplemented"; |
| 182 | return NULL; |
| 183 | } |
| 184 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 185 | jboolean IsInstanceOf(JNIEnv* env, jobject obj, jclass clazz) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 186 | LOG(FATAL) << "Unimplemented"; |
| 187 | return JNI_FALSE; |
| 188 | } |
| 189 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 190 | jmethodID GetMethodID(JNIEnv* env, |
| 191 | jclass clazz, const char* name, const char* sig) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 192 | LOG(FATAL) << "Unimplemented"; |
| 193 | return NULL; |
| 194 | } |
| 195 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 196 | jobject CallObjectMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 197 | LOG(FATAL) << "Unimplemented"; |
| 198 | return NULL; |
| 199 | } |
| 200 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 201 | jobject CallObjectMethodV(JNIEnv* env, |
| 202 | jobject obj, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 203 | LOG(FATAL) << "Unimplemented"; |
| 204 | return NULL; |
| 205 | } |
| 206 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 207 | jobject CallObjectMethodA(JNIEnv* env, |
| 208 | jobject obj, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 209 | LOG(FATAL) << "Unimplemented"; |
| 210 | return NULL; |
| 211 | } |
| 212 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 213 | jboolean CallBooleanMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 214 | LOG(FATAL) << "Unimplemented"; |
| 215 | return JNI_FALSE; |
| 216 | } |
| 217 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 218 | jboolean CallBooleanMethodV(JNIEnv* env, |
| 219 | jobject obj, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 220 | LOG(FATAL) << "Unimplemented"; |
| 221 | return JNI_FALSE; |
| 222 | } |
| 223 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 224 | jboolean CallBooleanMethodA(JNIEnv* env, |
| 225 | jobject obj, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 226 | LOG(FATAL) << "Unimplemented"; |
| 227 | return JNI_FALSE; |
| 228 | } |
| 229 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 230 | jbyte CallByteMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 231 | LOG(FATAL) << "Unimplemented"; |
| 232 | return 0; |
| 233 | } |
| 234 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 235 | jbyte CallByteMethodV(JNIEnv* env, |
| 236 | jobject obj, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 237 | LOG(FATAL) << "Unimplemented"; |
| 238 | return 0; |
| 239 | } |
| 240 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 241 | jbyte CallByteMethodA(JNIEnv* env, |
| 242 | jobject obj, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 243 | LOG(FATAL) << "Unimplemented"; |
| 244 | return 0; |
| 245 | } |
| 246 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 247 | jchar CallCharMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 248 | LOG(FATAL) << "Unimplemented"; |
| 249 | return 0; |
| 250 | } |
| 251 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 252 | jchar CallCharMethodV(JNIEnv* env, |
| 253 | jobject obj, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 254 | LOG(FATAL) << "Unimplemented"; |
| 255 | return 0; |
| 256 | } |
| 257 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 258 | jchar CallCharMethodA(JNIEnv* env, |
| 259 | jobject obj, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 260 | LOG(FATAL) << "Unimplemented"; |
| 261 | return 0; |
| 262 | } |
| 263 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 264 | jshort CallShortMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 265 | LOG(FATAL) << "Unimplemented"; |
| 266 | return 0; |
| 267 | } |
| 268 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 269 | jshort CallShortMethodV(JNIEnv* env, |
| 270 | jobject obj, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 271 | LOG(FATAL) << "Unimplemented"; |
| 272 | return 0; |
| 273 | } |
| 274 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 275 | jshort CallShortMethodA(JNIEnv* env, |
| 276 | jobject obj, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 277 | LOG(FATAL) << "Unimplemented"; |
| 278 | return 0; |
| 279 | } |
| 280 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 281 | jint CallIntMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 282 | LOG(FATAL) << "Unimplemented"; |
| 283 | return 0; |
| 284 | } |
| 285 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 286 | jint CallIntMethodV(JNIEnv* env, |
| 287 | jobject obj, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 288 | LOG(FATAL) << "Unimplemented"; |
| 289 | return 0; |
| 290 | } |
| 291 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 292 | jint CallIntMethodA(JNIEnv* env, |
| 293 | jobject obj, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 294 | LOG(FATAL) << "Unimplemented"; |
| 295 | return 0; |
| 296 | } |
| 297 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 298 | jlong CallLongMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 299 | LOG(FATAL) << "Unimplemented"; |
| 300 | return 0; |
| 301 | } |
| 302 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 303 | jlong CallLongMethodV(JNIEnv* env, |
| 304 | jobject obj, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 305 | LOG(FATAL) << "Unimplemented"; |
| 306 | return 0; |
| 307 | } |
| 308 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 309 | jlong CallLongMethodA(JNIEnv* env, |
| 310 | jobject obj, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 311 | LOG(FATAL) << "Unimplemented"; |
| 312 | return 0; |
| 313 | } |
| 314 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 315 | jfloat CallFloatMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 316 | LOG(FATAL) << "Unimplemented"; |
| 317 | return 0; |
| 318 | } |
| 319 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 320 | jfloat CallFloatMethodV(JNIEnv* env, |
| 321 | jobject obj, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 322 | LOG(FATAL) << "Unimplemented"; |
| 323 | return 0; |
| 324 | } |
| 325 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 326 | jfloat CallFloatMethodA(JNIEnv* env, |
| 327 | jobject obj, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 328 | LOG(FATAL) << "Unimplemented"; |
| 329 | return 0; |
| 330 | } |
| 331 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 332 | jdouble CallDoubleMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 333 | LOG(FATAL) << "Unimplemented"; |
| 334 | return 0; |
| 335 | } |
| 336 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 337 | jdouble CallDoubleMethodV(JNIEnv* env, |
| 338 | jobject obj, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 339 | LOG(FATAL) << "Unimplemented"; |
| 340 | return 0; |
| 341 | } |
| 342 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 343 | jdouble CallDoubleMethodA(JNIEnv* env, |
| 344 | jobject obj, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 345 | LOG(FATAL) << "Unimplemented"; |
| 346 | return 0; |
| 347 | } |
| 348 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 349 | void CallVoidMethod(JNIEnv* env, jobject obj, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 350 | LOG(FATAL) << "Unimplemented"; |
| 351 | } |
| 352 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 353 | void CallVoidMethodV(JNIEnv* env, jobject obj, |
| 354 | jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 355 | LOG(FATAL) << "Unimplemented"; |
| 356 | } |
| 357 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 358 | void CallVoidMethodA(JNIEnv* env, jobject obj, |
| 359 | jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 360 | LOG(FATAL) << "Unimplemented"; |
| 361 | } |
| 362 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 363 | jobject CallNonvirtualObjectMethod(JNIEnv* env, |
| 364 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 365 | LOG(FATAL) << "Unimplemented"; |
| 366 | return NULL; |
| 367 | } |
| 368 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 369 | jobject CallNonvirtualObjectMethodV(JNIEnv* env, |
| 370 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 371 | LOG(FATAL) << "Unimplemented"; |
| 372 | return NULL; |
| 373 | } |
| 374 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 375 | jobject CallNonvirtualObjectMethodA(JNIEnv* env, |
| 376 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 377 | LOG(FATAL) << "Unimplemented"; |
| 378 | return NULL; |
| 379 | } |
| 380 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 381 | jboolean CallNonvirtualBooleanMethod(JNIEnv* env, |
| 382 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 383 | LOG(FATAL) << "Unimplemented"; |
| 384 | return JNI_FALSE; |
| 385 | } |
| 386 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 387 | jboolean CallNonvirtualBooleanMethodV(JNIEnv* env, |
| 388 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 389 | LOG(FATAL) << "Unimplemented"; |
| 390 | return JNI_FALSE; |
| 391 | } |
| 392 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 393 | jboolean CallNonvirtualBooleanMethodA(JNIEnv* env, |
| 394 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 395 | LOG(FATAL) << "Unimplemented"; |
| 396 | return JNI_FALSE; |
| 397 | } |
| 398 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 399 | jbyte CallNonvirtualByteMethod(JNIEnv* env, |
| 400 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 401 | LOG(FATAL) << "Unimplemented"; |
| 402 | return 0; |
| 403 | } |
| 404 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 405 | jbyte CallNonvirtualByteMethodV(JNIEnv* env, |
| 406 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 407 | LOG(FATAL) << "Unimplemented"; |
| 408 | return 0; |
| 409 | } |
| 410 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 411 | jbyte CallNonvirtualByteMethodA(JNIEnv* env, |
| 412 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 413 | LOG(FATAL) << "Unimplemented"; |
| 414 | return 0; |
| 415 | } |
| 416 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 417 | jchar CallNonvirtualCharMethod(JNIEnv* env, |
| 418 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 419 | LOG(FATAL) << "Unimplemented"; |
| 420 | return 0; |
| 421 | } |
| 422 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 423 | jchar CallNonvirtualCharMethodV(JNIEnv* env, |
| 424 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 425 | LOG(FATAL) << "Unimplemented"; |
| 426 | return 0; |
| 427 | } |
| 428 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 429 | jchar CallNonvirtualCharMethodA(JNIEnv* env, |
| 430 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 431 | LOG(FATAL) << "Unimplemented"; |
| 432 | return 0; |
| 433 | } |
| 434 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 435 | jshort CallNonvirtualShortMethod(JNIEnv* env, |
| 436 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 437 | LOG(FATAL) << "Unimplemented"; |
| 438 | return 0; |
| 439 | } |
| 440 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 441 | jshort CallNonvirtualShortMethodV(JNIEnv* env, |
| 442 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 443 | LOG(FATAL) << "Unimplemented"; |
| 444 | return 0; |
| 445 | } |
| 446 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 447 | jshort CallNonvirtualShortMethodA(JNIEnv* env, |
| 448 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 449 | LOG(FATAL) << "Unimplemented"; |
| 450 | return 0; |
| 451 | } |
| 452 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 453 | jint CallNonvirtualIntMethod(JNIEnv* env, |
| 454 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 455 | LOG(FATAL) << "Unimplemented"; |
| 456 | return 0; |
| 457 | } |
| 458 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 459 | jint CallNonvirtualIntMethodV(JNIEnv* env, |
| 460 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 461 | LOG(FATAL) << "Unimplemented"; |
| 462 | return 0; |
| 463 | } |
| 464 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 465 | jint CallNonvirtualIntMethodA(JNIEnv* env, |
| 466 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 467 | LOG(FATAL) << "Unimplemented"; |
| 468 | return 0; |
| 469 | } |
| 470 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 471 | jlong CallNonvirtualLongMethod(JNIEnv* env, |
| 472 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 473 | LOG(FATAL) << "Unimplemented"; |
| 474 | return 0; |
| 475 | } |
| 476 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 477 | jlong CallNonvirtualLongMethodV(JNIEnv* env, |
| 478 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 479 | LOG(FATAL) << "Unimplemented"; |
| 480 | return 0; |
| 481 | } |
| 482 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 483 | jlong CallNonvirtualLongMethodA(JNIEnv* env, |
| 484 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 485 | LOG(FATAL) << "Unimplemented"; |
| 486 | return 0; |
| 487 | } |
| 488 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 489 | jfloat CallNonvirtualFloatMethod(JNIEnv* env, |
| 490 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 491 | LOG(FATAL) << "Unimplemented"; |
| 492 | return 0; |
| 493 | } |
| 494 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 495 | jfloat CallNonvirtualFloatMethodV(JNIEnv* env, |
| 496 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 497 | LOG(FATAL) << "Unimplemented"; |
| 498 | return 0; |
| 499 | } |
| 500 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 501 | jfloat CallNonvirtualFloatMethodA(JNIEnv* env, |
| 502 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 503 | LOG(FATAL) << "Unimplemented"; |
| 504 | return 0; |
| 505 | } |
| 506 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 507 | jdouble CallNonvirtualDoubleMethod(JNIEnv* env, |
| 508 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 509 | LOG(FATAL) << "Unimplemented"; |
| 510 | return 0; |
| 511 | } |
| 512 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 513 | jdouble CallNonvirtualDoubleMethodV(JNIEnv* env, |
| 514 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 515 | LOG(FATAL) << "Unimplemented"; |
| 516 | return 0; |
| 517 | } |
| 518 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 519 | jdouble CallNonvirtualDoubleMethodA(JNIEnv* env, |
| 520 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 521 | LOG(FATAL) << "Unimplemented"; |
| 522 | return 0; |
| 523 | } |
| 524 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 525 | void CallNonvirtualVoidMethod(JNIEnv* env, |
| 526 | jobject obj, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 527 | LOG(FATAL) << "Unimplemented"; |
| 528 | } |
| 529 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 530 | void CallNonvirtualVoidMethodV(JNIEnv* env, |
| 531 | jobject obj, jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 532 | LOG(FATAL) << "Unimplemented"; |
| 533 | } |
| 534 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 535 | void CallNonvirtualVoidMethodA(JNIEnv* env, |
| 536 | jobject obj, jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 537 | LOG(FATAL) << "Unimplemented"; |
| 538 | } |
| 539 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 540 | jfieldID GetFieldID(JNIEnv* env, |
| 541 | jclass clazz, const char* name, const char* sig) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 542 | LOG(FATAL) << "Unimplemented"; |
| 543 | return NULL; |
| 544 | } |
| 545 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 546 | jobject GetObjectField(JNIEnv* env, jobject obj, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 547 | LOG(FATAL) << "Unimplemented"; |
| 548 | return NULL; |
| 549 | } |
| 550 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 551 | jboolean GetBooleanField(JNIEnv* env, jobject obj, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 552 | LOG(FATAL) << "Unimplemented"; |
| 553 | return JNI_FALSE; |
| 554 | } |
| 555 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 556 | jbyte GetByteField(JNIEnv* env, jobject obj, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 557 | LOG(FATAL) << "Unimplemented"; |
| 558 | return 0; |
| 559 | } |
| 560 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 561 | jchar GetCharField(JNIEnv* env, jobject obj, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 562 | LOG(FATAL) << "Unimplemented"; |
| 563 | return 0; |
| 564 | } |
| 565 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 566 | jshort GetShortField(JNIEnv* env, jobject obj, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 567 | LOG(FATAL) << "Unimplemented"; |
| 568 | return 0; |
| 569 | } |
| 570 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 571 | jint GetIntField(JNIEnv* env, jobject obj, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 572 | LOG(FATAL) << "Unimplemented"; |
| 573 | return 0; |
| 574 | } |
| 575 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 576 | jlong GetLongField(JNIEnv* env, jobject obj, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 577 | LOG(FATAL) << "Unimplemented"; |
| 578 | return 0; |
| 579 | } |
| 580 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 581 | jfloat GetFloatField(JNIEnv* env, jobject obj, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 582 | LOG(FATAL) << "Unimplemented"; |
| 583 | return 0; |
| 584 | } |
| 585 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 586 | jdouble GetDoubleField(JNIEnv* env, jobject obj, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 587 | LOG(FATAL) << "Unimplemented"; |
| 588 | return 0; |
| 589 | } |
| 590 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 591 | void SetObjectField(JNIEnv* env, jobject obj, jfieldID fieldID, jobject val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 592 | LOG(FATAL) << "Unimplemented"; |
| 593 | } |
| 594 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 595 | void SetBooleanField(JNIEnv* env, jobject obj, jfieldID fieldID, jboolean val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 596 | LOG(FATAL) << "Unimplemented"; |
| 597 | } |
| 598 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 599 | void SetByteField(JNIEnv* env, jobject obj, jfieldID fieldID, jbyte val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 600 | LOG(FATAL) << "Unimplemented"; |
| 601 | } |
| 602 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 603 | void SetCharField(JNIEnv* env, jobject obj, jfieldID fieldID, jchar val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 604 | LOG(FATAL) << "Unimplemented"; |
| 605 | } |
| 606 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 607 | void SetShortField(JNIEnv* env, jobject obj, jfieldID fieldID, jshort val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 608 | LOG(FATAL) << "Unimplemented"; |
| 609 | } |
| 610 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 611 | void SetIntField(JNIEnv* env, jobject obj, jfieldID fieldID, jint val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 612 | LOG(FATAL) << "Unimplemented"; |
| 613 | } |
| 614 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 615 | void SetLongField(JNIEnv* env, jobject obj, jfieldID fieldID, jlong val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 616 | LOG(FATAL) << "Unimplemented"; |
| 617 | } |
| 618 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 619 | void SetFloatField(JNIEnv* env, jobject obj, jfieldID fieldID, jfloat val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 620 | LOG(FATAL) << "Unimplemented"; |
| 621 | } |
| 622 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 623 | void SetDoubleField(JNIEnv* env, jobject obj, jfieldID fieldID, jdouble val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 624 | LOG(FATAL) << "Unimplemented"; |
| 625 | } |
| 626 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 627 | jmethodID GetStaticMethodID(JNIEnv* env, |
| 628 | jclass clazz, const char* name, const char* sig) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 629 | LOG(FATAL) << "Unimplemented"; |
| 630 | return NULL; |
| 631 | } |
| 632 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 633 | jobject CallStaticObjectMethod(JNIEnv* env, |
| 634 | jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 635 | LOG(FATAL) << "Unimplemented"; |
| 636 | return NULL; |
| 637 | } |
| 638 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 639 | jobject CallStaticObjectMethodV(JNIEnv* env, |
| 640 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 641 | LOG(FATAL) << "Unimplemented"; |
| 642 | return NULL; |
| 643 | } |
| 644 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 645 | jobject CallStaticObjectMethodA(JNIEnv* env, |
| 646 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 647 | LOG(FATAL) << "Unimplemented"; |
| 648 | return NULL; |
| 649 | } |
| 650 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 651 | jboolean CallStaticBooleanMethod(JNIEnv* env, |
| 652 | jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 653 | LOG(FATAL) << "Unimplemented"; |
| 654 | return JNI_FALSE; |
| 655 | } |
| 656 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 657 | jboolean CallStaticBooleanMethodV(JNIEnv* env, |
| 658 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 659 | LOG(FATAL) << "Unimplemented"; |
| 660 | return JNI_FALSE; |
| 661 | } |
| 662 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 663 | jboolean CallStaticBooleanMethodA(JNIEnv* env, |
| 664 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 665 | LOG(FATAL) << "Unimplemented"; |
| 666 | return JNI_FALSE; |
| 667 | } |
| 668 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 669 | jbyte CallStaticByteMethod(JNIEnv* env, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 670 | LOG(FATAL) << "Unimplemented"; |
| 671 | return 0; |
| 672 | } |
| 673 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 674 | jbyte CallStaticByteMethodV(JNIEnv* env, |
| 675 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 676 | LOG(FATAL) << "Unimplemented"; |
| 677 | return 0; |
| 678 | } |
| 679 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 680 | jbyte CallStaticByteMethodA(JNIEnv* env, |
| 681 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 682 | LOG(FATAL) << "Unimplemented"; |
| 683 | return 0; |
| 684 | } |
| 685 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 686 | jchar CallStaticCharMethod(JNIEnv* env, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 687 | LOG(FATAL) << "Unimplemented"; |
| 688 | return 0; |
| 689 | } |
| 690 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 691 | jchar CallStaticCharMethodV(JNIEnv* env, |
| 692 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 693 | LOG(FATAL) << "Unimplemented"; |
| 694 | return 0; |
| 695 | } |
| 696 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 697 | jchar CallStaticCharMethodA(JNIEnv* env, |
| 698 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 699 | LOG(FATAL) << "Unimplemented"; |
| 700 | return 0; |
| 701 | } |
| 702 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 703 | jshort CallStaticShortMethod(JNIEnv* env, |
| 704 | jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 705 | LOG(FATAL) << "Unimplemented"; |
| 706 | return 0; |
| 707 | } |
| 708 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 709 | jshort CallStaticShortMethodV(JNIEnv* env, |
| 710 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 711 | LOG(FATAL) << "Unimplemented"; |
| 712 | return 0; |
| 713 | } |
| 714 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 715 | jshort CallStaticShortMethodA(JNIEnv* env, |
| 716 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 717 | LOG(FATAL) << "Unimplemented"; |
| 718 | return 0; |
| 719 | } |
| 720 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 721 | jint CallStaticIntMethod(JNIEnv* env, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 722 | LOG(FATAL) << "Unimplemented"; |
| 723 | return 0; |
| 724 | } |
| 725 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 726 | jint CallStaticIntMethodV(JNIEnv* env, |
| 727 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 728 | LOG(FATAL) << "Unimplemented"; |
| 729 | return 0; |
| 730 | } |
| 731 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 732 | jint CallStaticIntMethodA(JNIEnv* env, |
| 733 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 734 | LOG(FATAL) << "Unimplemented"; |
| 735 | return 0; |
| 736 | } |
| 737 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 738 | jlong CallStaticLongMethod(JNIEnv* env, jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 739 | LOG(FATAL) << "Unimplemented"; |
| 740 | return 0; |
| 741 | } |
| 742 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 743 | jlong CallStaticLongMethodV(JNIEnv* env, |
| 744 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 745 | LOG(FATAL) << "Unimplemented"; |
| 746 | return 0; |
| 747 | } |
| 748 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 749 | jlong CallStaticLongMethodA(JNIEnv* env, |
| 750 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 751 | LOG(FATAL) << "Unimplemented"; |
| 752 | return 0; |
| 753 | } |
| 754 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 755 | jfloat CallStaticFloatMethod(JNIEnv* env, |
| 756 | jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 757 | LOG(FATAL) << "Unimplemented"; |
| 758 | return 0; |
| 759 | } |
| 760 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 761 | jfloat CallStaticFloatMethodV(JNIEnv* env, |
| 762 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 763 | LOG(FATAL) << "Unimplemented"; |
| 764 | return 0; |
| 765 | } |
| 766 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 767 | jfloat CallStaticFloatMethodA(JNIEnv* env, |
| 768 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 769 | LOG(FATAL) << "Unimplemented"; |
| 770 | return 0; |
| 771 | } |
| 772 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 773 | jdouble CallStaticDoubleMethod(JNIEnv* env, |
| 774 | jclass clazz, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 775 | LOG(FATAL) << "Unimplemented"; |
| 776 | return 0; |
| 777 | } |
| 778 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 779 | jdouble CallStaticDoubleMethodV(JNIEnv* env, |
| 780 | jclass clazz, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 781 | LOG(FATAL) << "Unimplemented"; |
| 782 | return 0; |
| 783 | } |
| 784 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 785 | jdouble CallStaticDoubleMethodA(JNIEnv* env, |
| 786 | jclass clazz, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 787 | LOG(FATAL) << "Unimplemented"; |
| 788 | return 0; |
| 789 | } |
| 790 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 791 | void CallStaticVoidMethod(JNIEnv* env, jclass cls, jmethodID methodID, ...) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 792 | LOG(FATAL) << "Unimplemented"; |
| 793 | } |
| 794 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 795 | void CallStaticVoidMethodV(JNIEnv* env, |
| 796 | jclass cls, jmethodID methodID, va_list args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 797 | LOG(FATAL) << "Unimplemented"; |
| 798 | } |
| 799 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 800 | void CallStaticVoidMethodA(JNIEnv* env, |
| 801 | jclass cls, jmethodID methodID, jvalue* args) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 802 | LOG(FATAL) << "Unimplemented"; |
| 803 | } |
| 804 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 805 | jfieldID GetStaticFieldID(JNIEnv* env, |
| 806 | jclass clazz, const char* name, const char* sig) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 807 | LOG(FATAL) << "Unimplemented"; |
| 808 | return 0; |
| 809 | } |
| 810 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 811 | jobject GetStaticObjectField(JNIEnv* env, jclass clazz, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 812 | LOG(FATAL) << "Unimplemented"; |
| 813 | return NULL; |
| 814 | } |
| 815 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 816 | jboolean GetStaticBooleanField(JNIEnv* env, jclass clazz, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 817 | LOG(FATAL) << "Unimplemented"; |
| 818 | return JNI_FALSE; |
| 819 | } |
| 820 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 821 | jbyte GetStaticByteField(JNIEnv* env, jclass clazz, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 822 | LOG(FATAL) << "Unimplemented"; |
| 823 | return 0; |
| 824 | } |
| 825 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 826 | jchar GetStaticCharField(JNIEnv* env, jclass clazz, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 827 | LOG(FATAL) << "Unimplemented"; |
| 828 | return 0; |
| 829 | } |
| 830 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 831 | jshort GetStaticShortField(JNIEnv* env, jclass clazz, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 832 | LOG(FATAL) << "Unimplemented"; |
| 833 | return 0; |
| 834 | } |
| 835 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 836 | jint GetStaticIntField(JNIEnv* env, jclass clazz, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 837 | LOG(FATAL) << "Unimplemented"; |
| 838 | return 0; |
| 839 | } |
| 840 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 841 | jlong GetStaticLongField(JNIEnv* env, jclass clazz, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 842 | LOG(FATAL) << "Unimplemented"; |
| 843 | return 0; |
| 844 | } |
| 845 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 846 | jfloat GetStaticFloatField(JNIEnv* env, jclass clazz, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 847 | LOG(FATAL) << "Unimplemented"; |
| 848 | return 0; |
| 849 | } |
| 850 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 851 | jdouble GetStaticDoubleField(JNIEnv* env, jclass clazz, jfieldID fieldID) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 852 | LOG(FATAL) << "Unimplemented"; |
| 853 | return 0; |
| 854 | } |
| 855 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 856 | void SetStaticObjectField(JNIEnv* env, |
| 857 | jclass clazz, jfieldID fieldID, jobject value) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 858 | LOG(FATAL) << "Unimplemented"; |
| 859 | } |
| 860 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 861 | void SetStaticBooleanField(JNIEnv* env, |
| 862 | jclass clazz, jfieldID fieldID, jboolean value) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 863 | LOG(FATAL) << "Unimplemented"; |
| 864 | } |
| 865 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 866 | void SetStaticByteField(JNIEnv* env, |
| 867 | jclass clazz, jfieldID fieldID, jbyte value) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 868 | LOG(FATAL) << "Unimplemented"; |
| 869 | } |
| 870 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 871 | void SetStaticCharField(JNIEnv* env, |
| 872 | jclass clazz, jfieldID fieldID, jchar value) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 873 | LOG(FATAL) << "Unimplemented"; |
| 874 | } |
| 875 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 876 | void SetStaticShortField(JNIEnv* env, |
| 877 | jclass clazz, jfieldID fieldID, jshort value) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 878 | LOG(FATAL) << "Unimplemented"; |
| 879 | } |
| 880 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 881 | void SetStaticIntField(JNIEnv* env, |
| 882 | jclass clazz, jfieldID fieldID, jint value) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 883 | LOG(FATAL) << "Unimplemented"; |
| 884 | } |
| 885 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 886 | void SetStaticLongField(JNIEnv* env, |
| 887 | jclass clazz, jfieldID fieldID, jlong value) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 888 | LOG(FATAL) << "Unimplemented"; |
| 889 | } |
| 890 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 891 | void SetStaticFloatField(JNIEnv* env, |
| 892 | jclass clazz, jfieldID fieldID, jfloat value) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 893 | LOG(FATAL) << "Unimplemented"; |
| 894 | } |
| 895 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 896 | void SetStaticDoubleField(JNIEnv* env, |
| 897 | jclass clazz, jfieldID fieldID, jdouble value) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 898 | LOG(FATAL) << "Unimplemented"; |
| 899 | } |
| 900 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 901 | jstring NewString(JNIEnv* env, const jchar* unicode, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 902 | LOG(FATAL) << "Unimplemented"; |
| 903 | return NULL; |
| 904 | } |
| 905 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 906 | jsize GetStringLength(JNIEnv* env, jstring str) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 907 | LOG(FATAL) << "Unimplemented"; |
| 908 | return 0; |
| 909 | } |
| 910 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 911 | const jchar* GetStringChars(JNIEnv* env, jstring str, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 912 | LOG(FATAL) << "Unimplemented"; |
| 913 | return NULL; |
| 914 | } |
| 915 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 916 | void ReleaseStringChars(JNIEnv* env, jstring str, const jchar* chars) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 917 | LOG(FATAL) << "Unimplemented"; |
| 918 | } |
| 919 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 920 | jstring NewStringUTF(JNIEnv* env, const char* utf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 921 | LOG(FATAL) << "Unimplemented"; |
| 922 | return NULL; |
| 923 | } |
| 924 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 925 | jsize GetStringUTFLength(JNIEnv* env, jstring str) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 926 | LOG(FATAL) << "Unimplemented"; |
| 927 | return 0; |
| 928 | } |
| 929 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 930 | const char* GetStringUTFChars(JNIEnv* env, jstring str, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 931 | LOG(FATAL) << "Unimplemented"; |
| 932 | return NULL; |
| 933 | } |
| 934 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 935 | void ReleaseStringUTFChars(JNIEnv* env, jstring str, const char* chars) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 936 | LOG(FATAL) << "Unimplemented"; |
| 937 | } |
| 938 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 939 | jsize GetArrayLength(JNIEnv* env, jarray array) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 940 | LOG(FATAL) << "Unimplemented"; |
| 941 | return 0; |
| 942 | } |
| 943 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 944 | jobjectArray NewObjectArray(JNIEnv* env, |
| 945 | jsize len, jclass clazz, jobject init) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 946 | LOG(FATAL) << "Unimplemented"; |
| 947 | return NULL; |
| 948 | } |
| 949 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 950 | jobject GetObjectArrayElement(JNIEnv* env, jobjectArray array, jsize index) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 951 | LOG(FATAL) << "Unimplemented"; |
| 952 | return NULL; |
| 953 | } |
| 954 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 955 | void SetObjectArrayElement(JNIEnv* env, |
| 956 | jobjectArray array, jsize index, jobject val) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 957 | LOG(FATAL) << "Unimplemented"; |
| 958 | } |
| 959 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 960 | jbooleanArray NewBooleanArray(JNIEnv* env, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 961 | LOG(FATAL) << "Unimplemented"; |
| 962 | return NULL; |
| 963 | } |
| 964 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 965 | jbyteArray NewByteArray(JNIEnv* env, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 966 | LOG(FATAL) << "Unimplemented"; |
| 967 | return NULL; |
| 968 | } |
| 969 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 970 | jcharArray NewCharArray(JNIEnv* env, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 971 | LOG(FATAL) << "Unimplemented"; |
| 972 | return NULL; |
| 973 | } |
| 974 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 975 | jshortArray NewShortArray(JNIEnv* env, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 976 | LOG(FATAL) << "Unimplemented"; |
| 977 | return NULL; |
| 978 | } |
| 979 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 980 | jintArray NewIntArray(JNIEnv* env, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 981 | LOG(FATAL) << "Unimplemented"; |
| 982 | return NULL; |
| 983 | } |
| 984 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 985 | jlongArray NewLongArray(JNIEnv* env, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 986 | LOG(FATAL) << "Unimplemented"; |
| 987 | return NULL; |
| 988 | } |
| 989 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 990 | jfloatArray NewFloatArray(JNIEnv* env, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 991 | LOG(FATAL) << "Unimplemented"; |
| 992 | return NULL; |
| 993 | } |
| 994 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 995 | jdoubleArray NewDoubleArray(JNIEnv* env, jsize len) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 996 | LOG(FATAL) << "Unimplemented"; |
| 997 | return NULL; |
| 998 | } |
| 999 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1000 | jboolean* GetBooleanArrayElements(JNIEnv* env, |
| 1001 | jbooleanArray array, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1002 | LOG(FATAL) << "Unimplemented"; |
| 1003 | return NULL; |
| 1004 | } |
| 1005 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1006 | jbyte* GetByteArrayElements(JNIEnv* env, jbyteArray array, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1007 | LOG(FATAL) << "Unimplemented"; |
| 1008 | return NULL; |
| 1009 | } |
| 1010 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1011 | jchar* GetCharArrayElements(JNIEnv* env, jcharArray array, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1012 | LOG(FATAL) << "Unimplemented"; |
| 1013 | return NULL; |
| 1014 | } |
| 1015 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1016 | jshort* GetShortArrayElements(JNIEnv* env, |
| 1017 | jshortArray array, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1018 | LOG(FATAL) << "Unimplemented"; |
| 1019 | return NULL; |
| 1020 | } |
| 1021 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1022 | jint* GetIntArrayElements(JNIEnv* env, jintArray array, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1023 | LOG(FATAL) << "Unimplemented"; |
| 1024 | return NULL; |
| 1025 | } |
| 1026 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1027 | jlong* GetLongArrayElements(JNIEnv* env, jlongArray array, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1028 | LOG(FATAL) << "Unimplemented"; |
| 1029 | return NULL; |
| 1030 | } |
| 1031 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1032 | jfloat* GetFloatArrayElements(JNIEnv* env, |
| 1033 | jfloatArray array, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1034 | LOG(FATAL) << "Unimplemented"; |
| 1035 | return NULL; |
| 1036 | } |
| 1037 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1038 | jdouble* GetDoubleArrayElements(JNIEnv* env, |
| 1039 | jdoubleArray array, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1040 | LOG(FATAL) << "Unimplemented"; |
| 1041 | return NULL; |
| 1042 | } |
| 1043 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1044 | void ReleaseBooleanArrayElements(JNIEnv* env, |
| 1045 | jbooleanArray array, jboolean* elems, jint mode) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1046 | LOG(FATAL) << "Unimplemented"; |
| 1047 | } |
| 1048 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1049 | void ReleaseByteArrayElements(JNIEnv* env, |
| 1050 | jbyteArray array, jbyte* elems, jint mode) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1051 | LOG(FATAL) << "Unimplemented"; |
| 1052 | } |
| 1053 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1054 | void ReleaseCharArrayElements(JNIEnv* env, |
| 1055 | jcharArray array, jchar* elems, jint mode) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1056 | LOG(FATAL) << "Unimplemented"; |
| 1057 | } |
| 1058 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1059 | void ReleaseShortArrayElements(JNIEnv* env, |
| 1060 | jshortArray array, jshort* elems, jint mode) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1061 | LOG(FATAL) << "Unimplemented"; |
| 1062 | } |
| 1063 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1064 | void ReleaseIntArrayElements(JNIEnv* env, |
| 1065 | jintArray array, jint* elems, jint mode) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1066 | LOG(FATAL) << "Unimplemented"; |
| 1067 | } |
| 1068 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1069 | void ReleaseLongArrayElements(JNIEnv* env, |
| 1070 | jlongArray array, jlong* elems, jint mode) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1071 | LOG(FATAL) << "Unimplemented"; |
| 1072 | } |
| 1073 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1074 | void ReleaseFloatArrayElements(JNIEnv* env, |
| 1075 | jfloatArray array, jfloat* elems, jint mode) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1076 | LOG(FATAL) << "Unimplemented"; |
| 1077 | } |
| 1078 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1079 | void ReleaseDoubleArrayElements(JNIEnv* env, |
| 1080 | jdoubleArray array, jdouble* elems, jint mode) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1081 | LOG(FATAL) << "Unimplemented"; |
| 1082 | } |
| 1083 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1084 | void GetBooleanArrayRegion(JNIEnv* env, |
| 1085 | jbooleanArray array, jsize start, jsize l, jboolean* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1086 | LOG(FATAL) << "Unimplemented"; |
| 1087 | } |
| 1088 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1089 | void GetByteArrayRegion(JNIEnv* env, |
| 1090 | jbyteArray array, jsize start, jsize len, jbyte* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1091 | LOG(FATAL) << "Unimplemented"; |
| 1092 | } |
| 1093 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1094 | void GetCharArrayRegion(JNIEnv* env, |
| 1095 | jcharArray array, jsize start, jsize len, jchar* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1096 | LOG(FATAL) << "Unimplemented"; |
| 1097 | } |
| 1098 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1099 | void GetShortArrayRegion(JNIEnv* env, |
| 1100 | jshortArray array, jsize start, jsize len, jshort* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1101 | LOG(FATAL) << "Unimplemented"; |
| 1102 | } |
| 1103 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1104 | void GetIntArrayRegion(JNIEnv* env, |
| 1105 | jintArray array, jsize start, jsize len, jint* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1106 | LOG(FATAL) << "Unimplemented"; |
| 1107 | } |
| 1108 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1109 | void GetLongArrayRegion(JNIEnv* env, |
| 1110 | jlongArray array, jsize start, jsize len, jlong* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1111 | LOG(FATAL) << "Unimplemented"; |
| 1112 | } |
| 1113 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1114 | void GetFloatArrayRegion(JNIEnv* env, |
| 1115 | jfloatArray array, jsize start, jsize len, jfloat* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1116 | LOG(FATAL) << "Unimplemented"; |
| 1117 | } |
| 1118 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1119 | void GetDoubleArrayRegion(JNIEnv* env, |
| 1120 | jdoubleArray array, jsize start, jsize len, jdouble* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1121 | LOG(FATAL) << "Unimplemented"; |
| 1122 | } |
| 1123 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1124 | void SetBooleanArrayRegion(JNIEnv* env, |
| 1125 | jbooleanArray array, jsize start, jsize l, const jboolean* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1126 | LOG(FATAL) << "Unimplemented"; |
| 1127 | } |
| 1128 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1129 | void SetByteArrayRegion(JNIEnv* env, |
| 1130 | jbyteArray array, jsize start, jsize len, const jbyte* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1131 | LOG(FATAL) << "Unimplemented"; |
| 1132 | } |
| 1133 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1134 | void SetCharArrayRegion(JNIEnv* env, |
| 1135 | jcharArray array, jsize start, jsize len, const jchar* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1136 | LOG(FATAL) << "Unimplemented"; |
| 1137 | } |
| 1138 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1139 | void SetShortArrayRegion(JNIEnv* env, |
| 1140 | jshortArray array, jsize start, jsize len, const jshort* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1141 | LOG(FATAL) << "Unimplemented"; |
| 1142 | } |
| 1143 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1144 | void SetIntArrayRegion(JNIEnv* env, |
| 1145 | jintArray array, jsize start, jsize len, const jint* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1146 | LOG(FATAL) << "Unimplemented"; |
| 1147 | } |
| 1148 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1149 | void SetLongArrayRegion(JNIEnv* env, |
| 1150 | jlongArray array, jsize start, jsize len, const jlong* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1151 | LOG(FATAL) << "Unimplemented"; |
| 1152 | } |
| 1153 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1154 | void SetFloatArrayRegion(JNIEnv* env, |
| 1155 | jfloatArray array, jsize start, jsize len, const jfloat* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1156 | LOG(FATAL) << "Unimplemented"; |
| 1157 | } |
| 1158 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1159 | void SetDoubleArrayRegion(JNIEnv* env, |
| 1160 | jdoubleArray array, jsize start, jsize len, const jdouble* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1161 | LOG(FATAL) << "Unimplemented"; |
| 1162 | } |
| 1163 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1164 | jint RegisterNatives(JNIEnv* env, |
| 1165 | jclass clazz, const JNINativeMethod* methods, jint nMethods) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1166 | LOG(FATAL) << "Unimplemented"; |
| 1167 | return 0; |
| 1168 | } |
| 1169 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1170 | jint UnregisterNatives(JNIEnv* env, jclass clazz) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1171 | LOG(FATAL) << "Unimplemented"; |
| 1172 | return 0; |
| 1173 | } |
| 1174 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1175 | jint MonitorEnter(JNIEnv* env, jobject obj) { |
| 1176 | LOG(WARNING) << "MonitorEnter unimplemented"; |
| 1177 | return 0; |
| 1178 | } |
| 1179 | |
| 1180 | jint MonitorExit(JNIEnv* env, jobject obj) { |
| 1181 | LOG(WARNING) << "MonitorExit unimplemented"; |
| 1182 | return 0; |
| 1183 | } |
| 1184 | |
| 1185 | jint GetJavaVM(JNIEnv* env, JavaVM* *vm) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1186 | LOG(FATAL) << "Unimplemented"; |
| 1187 | return 0; |
| 1188 | } |
| 1189 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1190 | void GetStringRegion(JNIEnv* env, |
| 1191 | jstring str, jsize start, jsize len, jchar* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1192 | LOG(FATAL) << "Unimplemented"; |
| 1193 | } |
| 1194 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1195 | void GetStringUTFRegion(JNIEnv* env, |
| 1196 | jstring str, jsize start, jsize len, char* buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1197 | LOG(FATAL) << "Unimplemented"; |
| 1198 | } |
| 1199 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1200 | void* GetPrimitiveArrayCritical(JNIEnv* env, |
| 1201 | jarray array, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1202 | LOG(FATAL) << "Unimplemented"; |
| 1203 | return NULL; |
| 1204 | } |
| 1205 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1206 | void ReleasePrimitiveArrayCritical(JNIEnv* env, |
| 1207 | jarray array, void* carray, jint mode) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1208 | LOG(FATAL) << "Unimplemented"; |
| 1209 | } |
| 1210 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1211 | const jchar* GetStringCritical(JNIEnv* env, jstring s, jboolean* isCopy) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1212 | LOG(FATAL) << "Unimplemented"; |
| 1213 | return NULL; |
| 1214 | } |
| 1215 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1216 | void ReleaseStringCritical(JNIEnv* env, jstring s, const jchar* cstr) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1217 | LOG(FATAL) << "Unimplemented"; |
| 1218 | } |
| 1219 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1220 | jweak NewWeakGlobalRef(JNIEnv* env, jobject obj) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1221 | LOG(FATAL) << "Unimplemented"; |
| 1222 | return NULL; |
| 1223 | } |
| 1224 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1225 | void DeleteWeakGlobalRef(JNIEnv* env, jweak obj) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1226 | LOG(FATAL) << "Unimplemented"; |
| 1227 | } |
| 1228 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1229 | jboolean ExceptionCheck(JNIEnv* env) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1230 | LOG(FATAL) << "Unimplemented"; |
| 1231 | return JNI_FALSE; |
| 1232 | } |
| 1233 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1234 | jobject NewDirectByteBuffer(JNIEnv* env, void* address, jlong capacity) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1235 | LOG(FATAL) << "Unimplemented"; |
| 1236 | return NULL; |
| 1237 | } |
| 1238 | |
| 1239 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1240 | void* GetDirectBufferAddress(JNIEnv* env, jobject buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1241 | LOG(FATAL) << "Unimplemented"; |
| 1242 | return NULL; |
| 1243 | } |
| 1244 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1245 | jlong GetDirectBufferCapacity(JNIEnv* env, jobject buf) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1246 | LOG(FATAL) << "Unimplemented"; |
| 1247 | return 0; |
| 1248 | } |
| 1249 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1250 | jobjectRefType GetObjectRefType(JNIEnv* env, jobject jobj) { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1251 | LOG(FATAL) << "Unimplemented"; |
| 1252 | return JNIInvalidRefType; |
| 1253 | } |
| 1254 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1255 | static const struct JNINativeInterface gNativeInterface = { |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1256 | NULL, // reserved0. |
| 1257 | NULL, // reserved1. |
| 1258 | NULL, // reserved2. |
| 1259 | NULL, // reserved3. |
| 1260 | GetVersion, |
| 1261 | DefineClass, |
| 1262 | FindClass, |
| 1263 | FromReflectedMethod, |
| 1264 | FromReflectedField, |
| 1265 | ToReflectedMethod, |
| 1266 | GetSuperclass, |
| 1267 | IsAssignableFrom, |
| 1268 | ToReflectedField, |
| 1269 | Throw, |
| 1270 | ThrowNew, |
| 1271 | ExceptionOccurred, |
| 1272 | ExceptionDescribe, |
| 1273 | ExceptionClear, |
| 1274 | FatalError, |
| 1275 | PushLocalFrame, |
| 1276 | PopLocalFrame, |
| 1277 | NewGlobalRef, |
| 1278 | DeleteGlobalRef, |
| 1279 | DeleteLocalRef, |
| 1280 | IsSameObject, |
| 1281 | NewLocalRef, |
| 1282 | EnsureLocalCapacity, |
| 1283 | AllocObject, |
| 1284 | NewObject, |
| 1285 | NewObjectV, |
| 1286 | NewObjectA, |
| 1287 | GetObjectClass, |
| 1288 | IsInstanceOf, |
| 1289 | GetMethodID, |
| 1290 | CallObjectMethod, |
| 1291 | CallObjectMethodV, |
| 1292 | CallObjectMethodA, |
| 1293 | CallBooleanMethod, |
| 1294 | CallBooleanMethodV, |
| 1295 | CallBooleanMethodA, |
| 1296 | CallByteMethod, |
| 1297 | CallByteMethodV, |
| 1298 | CallByteMethodA, |
| 1299 | CallCharMethod, |
| 1300 | CallCharMethodV, |
| 1301 | CallCharMethodA, |
| 1302 | CallShortMethod, |
| 1303 | CallShortMethodV, |
| 1304 | CallShortMethodA, |
| 1305 | CallIntMethod, |
| 1306 | CallIntMethodV, |
| 1307 | CallIntMethodA, |
| 1308 | CallLongMethod, |
| 1309 | CallLongMethodV, |
| 1310 | CallLongMethodA, |
| 1311 | CallFloatMethod, |
| 1312 | CallFloatMethodV, |
| 1313 | CallFloatMethodA, |
| 1314 | CallDoubleMethod, |
| 1315 | CallDoubleMethodV, |
| 1316 | CallDoubleMethodA, |
| 1317 | CallVoidMethod, |
| 1318 | CallVoidMethodV, |
| 1319 | CallVoidMethodA, |
| 1320 | CallNonvirtualObjectMethod, |
| 1321 | CallNonvirtualObjectMethodV, |
| 1322 | CallNonvirtualObjectMethodA, |
| 1323 | CallNonvirtualBooleanMethod, |
| 1324 | CallNonvirtualBooleanMethodV, |
| 1325 | CallNonvirtualBooleanMethodA, |
| 1326 | CallNonvirtualByteMethod, |
| 1327 | CallNonvirtualByteMethodV, |
| 1328 | CallNonvirtualByteMethodA, |
| 1329 | CallNonvirtualCharMethod, |
| 1330 | CallNonvirtualCharMethodV, |
| 1331 | CallNonvirtualCharMethodA, |
| 1332 | CallNonvirtualShortMethod, |
| 1333 | CallNonvirtualShortMethodV, |
| 1334 | CallNonvirtualShortMethodA, |
| 1335 | CallNonvirtualIntMethod, |
| 1336 | CallNonvirtualIntMethodV, |
| 1337 | CallNonvirtualIntMethodA, |
| 1338 | CallNonvirtualLongMethod, |
| 1339 | CallNonvirtualLongMethodV, |
| 1340 | CallNonvirtualLongMethodA, |
| 1341 | CallNonvirtualFloatMethod, |
| 1342 | CallNonvirtualFloatMethodV, |
| 1343 | CallNonvirtualFloatMethodA, |
| 1344 | CallNonvirtualDoubleMethod, |
| 1345 | CallNonvirtualDoubleMethodV, |
| 1346 | CallNonvirtualDoubleMethodA, |
| 1347 | CallNonvirtualVoidMethod, |
| 1348 | CallNonvirtualVoidMethodV, |
| 1349 | CallNonvirtualVoidMethodA, |
| 1350 | GetFieldID, |
| 1351 | GetObjectField, |
| 1352 | GetBooleanField, |
| 1353 | GetByteField, |
| 1354 | GetCharField, |
| 1355 | GetShortField, |
| 1356 | GetIntField, |
| 1357 | GetLongField, |
| 1358 | GetFloatField, |
| 1359 | GetDoubleField, |
| 1360 | SetObjectField, |
| 1361 | SetBooleanField, |
| 1362 | SetByteField, |
| 1363 | SetCharField, |
| 1364 | SetShortField, |
| 1365 | SetIntField, |
| 1366 | SetLongField, |
| 1367 | SetFloatField, |
| 1368 | SetDoubleField, |
| 1369 | GetStaticMethodID, |
| 1370 | CallStaticObjectMethod, |
| 1371 | CallStaticObjectMethodV, |
| 1372 | CallStaticObjectMethodA, |
| 1373 | CallStaticBooleanMethod, |
| 1374 | CallStaticBooleanMethodV, |
| 1375 | CallStaticBooleanMethodA, |
| 1376 | CallStaticByteMethod, |
| 1377 | CallStaticByteMethodV, |
| 1378 | CallStaticByteMethodA, |
| 1379 | CallStaticCharMethod, |
| 1380 | CallStaticCharMethodV, |
| 1381 | CallStaticCharMethodA, |
| 1382 | CallStaticShortMethod, |
| 1383 | CallStaticShortMethodV, |
| 1384 | CallStaticShortMethodA, |
| 1385 | CallStaticIntMethod, |
| 1386 | CallStaticIntMethodV, |
| 1387 | CallStaticIntMethodA, |
| 1388 | CallStaticLongMethod, |
| 1389 | CallStaticLongMethodV, |
| 1390 | CallStaticLongMethodA, |
| 1391 | CallStaticFloatMethod, |
| 1392 | CallStaticFloatMethodV, |
| 1393 | CallStaticFloatMethodA, |
| 1394 | CallStaticDoubleMethod, |
| 1395 | CallStaticDoubleMethodV, |
| 1396 | CallStaticDoubleMethodA, |
| 1397 | CallStaticVoidMethod, |
| 1398 | CallStaticVoidMethodV, |
| 1399 | CallStaticVoidMethodA, |
| 1400 | GetStaticFieldID, |
| 1401 | GetStaticObjectField, |
| 1402 | GetStaticBooleanField, |
| 1403 | GetStaticByteField, |
| 1404 | GetStaticCharField, |
| 1405 | GetStaticShortField, |
| 1406 | GetStaticIntField, |
| 1407 | GetStaticLongField, |
| 1408 | GetStaticFloatField, |
| 1409 | GetStaticDoubleField, |
| 1410 | SetStaticObjectField, |
| 1411 | SetStaticBooleanField, |
| 1412 | SetStaticByteField, |
| 1413 | SetStaticCharField, |
| 1414 | SetStaticShortField, |
| 1415 | SetStaticIntField, |
| 1416 | SetStaticLongField, |
| 1417 | SetStaticFloatField, |
| 1418 | SetStaticDoubleField, |
| 1419 | NewString, |
| 1420 | GetStringLength, |
| 1421 | GetStringChars, |
| 1422 | ReleaseStringChars, |
| 1423 | NewStringUTF, |
| 1424 | GetStringUTFLength, |
| 1425 | GetStringUTFChars, |
| 1426 | ReleaseStringUTFChars, |
| 1427 | GetArrayLength, |
| 1428 | NewObjectArray, |
| 1429 | GetObjectArrayElement, |
| 1430 | SetObjectArrayElement, |
| 1431 | NewBooleanArray, |
| 1432 | NewByteArray, |
| 1433 | NewCharArray, |
| 1434 | NewShortArray, |
| 1435 | NewIntArray, |
| 1436 | NewLongArray, |
| 1437 | NewFloatArray, |
| 1438 | NewDoubleArray, |
| 1439 | GetBooleanArrayElements, |
| 1440 | GetByteArrayElements, |
| 1441 | GetCharArrayElements, |
| 1442 | GetShortArrayElements, |
| 1443 | GetIntArrayElements, |
| 1444 | GetLongArrayElements, |
| 1445 | GetFloatArrayElements, |
| 1446 | GetDoubleArrayElements, |
| 1447 | ReleaseBooleanArrayElements, |
| 1448 | ReleaseByteArrayElements, |
| 1449 | ReleaseCharArrayElements, |
| 1450 | ReleaseShortArrayElements, |
| 1451 | ReleaseIntArrayElements, |
| 1452 | ReleaseLongArrayElements, |
| 1453 | ReleaseFloatArrayElements, |
| 1454 | ReleaseDoubleArrayElements, |
| 1455 | GetBooleanArrayRegion, |
| 1456 | GetByteArrayRegion, |
| 1457 | GetCharArrayRegion, |
| 1458 | GetShortArrayRegion, |
| 1459 | GetIntArrayRegion, |
| 1460 | GetLongArrayRegion, |
| 1461 | GetFloatArrayRegion, |
| 1462 | GetDoubleArrayRegion, |
| 1463 | SetBooleanArrayRegion, |
| 1464 | SetByteArrayRegion, |
| 1465 | SetCharArrayRegion, |
| 1466 | SetShortArrayRegion, |
| 1467 | SetIntArrayRegion, |
| 1468 | SetLongArrayRegion, |
| 1469 | SetFloatArrayRegion, |
| 1470 | SetDoubleArrayRegion, |
| 1471 | RegisterNatives, |
| 1472 | UnregisterNatives, |
| 1473 | MonitorEnter, |
| 1474 | MonitorExit, |
| 1475 | GetJavaVM, |
| 1476 | GetStringRegion, |
| 1477 | GetStringUTFRegion, |
| 1478 | GetPrimitiveArrayCritical, |
| 1479 | ReleasePrimitiveArrayCritical, |
| 1480 | GetStringCritical, |
| 1481 | ReleaseStringCritical, |
| 1482 | NewWeakGlobalRef, |
| 1483 | DeleteWeakGlobalRef, |
| 1484 | ExceptionCheck, |
| 1485 | NewDirectByteBuffer, |
| 1486 | GetDirectBufferAddress, |
| 1487 | GetDirectBufferCapacity, |
| 1488 | GetObjectRefType, |
| 1489 | }; |
| 1490 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1491 | void MonitorEnterHelper(JNIEnv* env, jobject obj) { |
| 1492 | MonitorEnter(env, obj); // Ignore the result. |
| 1493 | } |
| 1494 | |
| 1495 | void MonitorExitHelper(JNIEnv* env, jobject obj) { |
| 1496 | MonitorExit(env, obj); // Ignore the result. |
| 1497 | } |
| 1498 | |
| 1499 | JNIEnv* CreateJNIEnv() { |
| 1500 | JNIEnvExt* result = (JNIEnvExt*) calloc(1, sizeof(JNIEnvExt)); |
| 1501 | result->fns = &gNativeInterface; |
| 1502 | result->self = Thread::Current(); |
| 1503 | result->MonitorEnterHelper = &MonitorEnterHelper; |
| 1504 | result->MonitorExitHelper = &MonitorExitHelper; |
| 1505 | return reinterpret_cast<JNIEnv*>(result); |
| 1506 | } |
| 1507 | |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1508 | // JNI Invocation interface. |
| 1509 | |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1510 | extern "C" jint JNI_CreateJavaVM(JavaVM** p_vm, void** p_env, void* vm_args) { |
| 1511 | const JavaVMInitArgs* args = static_cast<JavaVMInitArgs*>(vm_args); |
| 1512 | if (args->version < JNI_VERSION_1_2) { |
| 1513 | return JNI_EVERSION; |
| 1514 | } |
| 1515 | Runtime::Options options; |
| 1516 | for (int i = 0; i < args->nOptions; ++i) { |
| 1517 | JavaVMOption* option = &args->options[i]; |
Carl Shapiro | fc322c7 | 2011-07-27 00:20:01 -0700 | [diff] [blame] | 1518 | options.push_back(std::make_pair(StringPiece(option->optionString), |
| 1519 | option->extraInfo)); |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1520 | } |
| 1521 | bool ignore_unrecognized = args->ignoreUnrecognized; |
| 1522 | scoped_ptr<Runtime> runtime(Runtime::Create(options, ignore_unrecognized)); |
| 1523 | if (runtime == NULL) { |
| 1524 | return JNI_ERR; |
| 1525 | } else { |
| 1526 | *p_env = reinterpret_cast<JNIEnv*>(Thread::Current()->GetJniEnv()); |
| 1527 | *p_vm = reinterpret_cast<JavaVM*>(runtime.release()); |
| 1528 | return JNI_OK; |
| 1529 | } |
| 1530 | } |
| 1531 | |
| 1532 | extern "C" jint JNI_GetCreatedJavaVMs(JavaVM** vmBuf, jsize bufLen, |
| 1533 | jsize* nVMs) { |
| 1534 | Runtime* runtime = Runtime::Current(); |
| 1535 | if (runtime == NULL) { |
| 1536 | *nVMs = 0; |
| 1537 | } else { |
| 1538 | *nVMs = 1; |
| 1539 | vmBuf[0] = reinterpret_cast<JavaVM*>(runtime); |
| 1540 | } |
| 1541 | return JNI_OK; |
| 1542 | } |
| 1543 | |
| 1544 | // Historically unsupported. |
| 1545 | extern "C" jint JNI_GetDefaultJavaVMInitArgs(void* vm_args) { |
| 1546 | return JNI_ERR; |
| 1547 | } |
| 1548 | |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1549 | jint JniInvokeInterface::DestroyJavaVM(JavaVM* vm) { |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1550 | if (vm == NULL) { |
| 1551 | return JNI_ERR; |
| 1552 | } else { |
| 1553 | Runtime* runtime = reinterpret_cast<Runtime*>(vm); |
| 1554 | delete runtime; |
| 1555 | return JNI_OK; |
| 1556 | } |
| 1557 | } |
| 1558 | |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1559 | jint JniInvokeInterface::AttachCurrentThread(JavaVM* vm, |
| 1560 | JNIEnv** p_env, |
| 1561 | void* thr_args) { |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1562 | if (vm == NULL || p_env == NULL) { |
| 1563 | return JNI_ERR; |
| 1564 | } |
| 1565 | Runtime* runtime = reinterpret_cast<Runtime*>(vm); |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1566 | const char* name = NULL; |
| 1567 | if (thr_args != NULL) { |
| 1568 | // TODO: check version |
| 1569 | name = static_cast<JavaVMAttachArgs*>(thr_args)->name; |
| 1570 | // TODO: thread group |
| 1571 | } |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1572 | bool success = runtime->AttachCurrentThread(name, p_env); |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1573 | if (!success) { |
| 1574 | return JNI_ERR; |
| 1575 | } else { |
| 1576 | return JNI_OK; |
| 1577 | } |
| 1578 | } |
| 1579 | |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1580 | jint JniInvokeInterface::DetachCurrentThread(JavaVM* vm) { |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1581 | if (vm == NULL) { |
| 1582 | return JNI_ERR; |
| 1583 | } else { |
| 1584 | Runtime* runtime = reinterpret_cast<Runtime*>(vm); |
| 1585 | runtime->DetachCurrentThread(); |
| 1586 | return JNI_OK; |
| 1587 | } |
| 1588 | } |
| 1589 | |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1590 | jint JniInvokeInterface::GetEnv(JavaVM *vm, void **env, jint version) { |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1591 | if (version < JNI_VERSION_1_1 || version > JNI_VERSION_1_6) { |
| 1592 | return JNI_EVERSION; |
| 1593 | } |
| 1594 | if (vm == NULL || env == NULL) { |
| 1595 | return JNI_ERR; |
| 1596 | } |
| 1597 | Thread* thread = Thread::Current(); |
| 1598 | if (thread == NULL) { |
| 1599 | *env = NULL; |
| 1600 | return JNI_EDETACHED; |
| 1601 | } |
| 1602 | *env = thread->GetJniEnv(); |
| 1603 | return JNI_OK; |
| 1604 | } |
| 1605 | |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1606 | jint JniInvokeInterface::AttachCurrentThreadAsDaemon(JavaVM* vm, |
| 1607 | JNIEnv** p_env, |
| 1608 | void* thr_args) { |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1609 | if (vm == NULL || p_env == NULL) { |
| 1610 | return JNI_ERR; |
| 1611 | } |
| 1612 | Runtime* runtime = reinterpret_cast<Runtime*>(vm); |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1613 | const char* name = NULL; |
| 1614 | if (thr_args != NULL) { |
| 1615 | // TODO: check version |
| 1616 | name = static_cast<JavaVMAttachArgs*>(thr_args)->name; |
| 1617 | // TODO: thread group |
| 1618 | } |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1619 | bool success = runtime->AttachCurrentThreadAsDaemon(name, p_env); |
Carl Shapiro | 2ed144c | 2011-07-26 16:52:08 -0700 | [diff] [blame] | 1620 | if (!success) { |
| 1621 | return JNI_ERR; |
| 1622 | } else { |
| 1623 | return JNI_OK; |
| 1624 | } |
| 1625 | } |
| 1626 | |
Carl Shapiro | ea4dca8 | 2011-08-01 13:45:38 -0700 | [diff] [blame] | 1627 | struct JNIInvokeInterface JniInvokeInterface::invoke_interface_ = { |
| 1628 | NULL, // reserved0 |
| 1629 | NULL, // reserved1 |
| 1630 | NULL, // reserved2 |
| 1631 | DestroyJavaVM, |
| 1632 | AttachCurrentThread, |
| 1633 | DetachCurrentThread, |
| 1634 | GetEnv, |
| 1635 | AttachCurrentThreadAsDaemon |
| 1636 | }; |
| 1637 | |
Ian Rogers | df20fe0 | 2011-07-20 20:34:16 -0700 | [diff] [blame] | 1638 | } // namespace art |