• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2017 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 package org.webrtc;
12 
13 import java.lang.annotation.ElementType;
14 import java.lang.annotation.Retention;
15 import java.lang.annotation.RetentionPolicy;
16 import java.lang.annotation.Target;
17 
18 /**
19  *  @CalledByNativeUnchecked is used to generate JNI bindings that do not check for exceptions.
20  *  It only makes sense to use this annotation on methods that declare a throws... spec.
21  *  However, note that the exception received native side maybe an 'unchecked' (RuntimeExpception)
22  *  such as NullPointerException, so the native code should differentiate these cases.
23  *  Usage of this should be very rare; where possible handle exceptions in the Java side and use a
24  *  return value to indicate success / failure.
25  */
26 @Target(ElementType.METHOD)
27 @Retention(RetentionPolicy.CLASS)
28 public @interface CalledByNativeUnchecked {
29   /*
30    *  If present, tells which inner class the method belongs to.
31    */
value()32   public String value() default "";
33 }
34