Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: base/android/jni_generator/golden_sample_for_tests_jni.h

Issue 2262883002: Handle @Annotated parameters when generating JNI headers from Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is autogenerated by 5 // This file is autogenerated by
6 // base/android/jni_generator/jni_generator.py 6 // base/android/jni_generator/jni_generator.py
7 // For 7 // For
8 // org/chromium/example/jni_generator/SampleForTests 8 // org/chromium/example/jni_generator/SampleForTests
9 9
10 #ifndef org_chromium_example_jni_generator_SampleForTests_JNI 10 #ifndef org_chromium_example_jni_generator_SampleForTests_JNI
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 "(" 273 "("
274 ")" 274 ")"
275 "V", 275 "V",
276 &g_SampleForTests_methodThatThrowsException); 276 &g_SampleForTests_methodThatThrowsException);
277 277
278 env->CallVoidMethod(obj.obj(), 278 env->CallVoidMethod(obj.obj(),
279 method_id); 279 method_id);
280 280
281 } 281 }
282 282
283 static base::subtle::AtomicWord g_SampleForTests_javaMethodWithAnnotatedParam =
284 0;
285 static void Java_SampleForTests_javaMethodWithAnnotatedParam(JNIEnv* env, const
286 base::android::JavaRefOrBare<jobject>& obj, JniIntWrapper foo) {
287 CHECK_CLAZZ(env, obj.obj(),
288 SampleForTests_clazz(env));
289 jmethodID method_id =
290 base::android::MethodID::LazyGet<
291 base::android::MethodID::TYPE_INSTANCE>(
292 env, SampleForTests_clazz(env),
293 "javaMethodWithAnnotatedParam",
294
295 "("
296 "I"
297 ")"
298 "V",
299 &g_SampleForTests_javaMethodWithAnnotatedParam);
300
301 env->CallVoidMethod(obj.obj(),
302 method_id, as_jint(foo));
303 jni_generator::CheckException(env);
304
305 }
306
283 static base::subtle::AtomicWord g_InnerStructA_create = 0; 307 static base::subtle::AtomicWord g_InnerStructA_create = 0;
284 static base::android::ScopedJavaLocalRef<jobject> 308 static base::android::ScopedJavaLocalRef<jobject>
285 Java_InnerStructA_create(JNIEnv* env, jlong l, 309 Java_InnerStructA_create(JNIEnv* env, jlong l,
286 JniIntWrapper i, 310 JniIntWrapper i,
287 const base::android::JavaRefOrBare<jstring>& s) { 311 const base::android::JavaRefOrBare<jstring>& s) {
288 CHECK_CLAZZ(env, InnerStructA_clazz(env), 312 CHECK_CLAZZ(env, InnerStructA_clazz(env),
289 InnerStructA_clazz(env), NULL); 313 InnerStructA_clazz(env), NULL);
290 jmethodID method_id = 314 jmethodID method_id =
291 base::android::MethodID::LazyGet< 315 base::android::MethodID::LazyGet<
292 base::android::MethodID::TYPE_STATIC>( 316 base::android::MethodID::TYPE_STATIC>(
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 return false; 537 return false;
514 } 538 }
515 539
516 return true; 540 return true;
517 } 541 }
518 542
519 } // namespace android 543 } // namespace android
520 } // namespace base 544 } // namespace base
521 545
522 #endif // org_chromium_example_jni_generator_SampleForTests_JNI 546 #endif // org_chromium_example_jni_generator_SampleForTests_JNI
OLDNEW
« no previous file with comments | « no previous file | base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698