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

Side by Side Diff: base/android/java/src/org/chromium/base/CalledByNativeUnchecked.java

Issue 1078343002: Move several annotations to annotations package. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.base;
6
7 import java.lang.annotation.ElementType;
8 import java.lang.annotation.Retention;
9 import java.lang.annotation.RetentionPolicy;
10 import java.lang.annotation.Target;
11
12 /**
13 * @CalledByNativeUnchecked is used to generate JNI bindings that do not check for exceptions.
14 * It only makes sense to use this annotation on methods that declare a throws. .. spec.
15 * However, note that the exception received native side maybe an 'unchecked' ( RuntimeExpception)
16 * such as NullPointerException, so the native code should differentiate these cases.
17 * Usage of this should be very rare; where possible handle exceptions in the J ava side and use a
18 * return value to indicate success / failure.
19 */
20 @Target(ElementType.METHOD)
21 @Retention(RetentionPolicy.CLASS)
22 public @interface CalledByNativeUnchecked {
23 /*
24 * If present, tells which inner class the method belongs to.
25 */
26 public String value() default "";
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698