1 // Copyright 2022 The Chromium Authors 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.jni_zero; 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 * Used by the JNI generator to create the necessary JNI bindings and expose this method to native 14 * test-only code. 15 * 16 * <p>Any method annotated by this will be kept around for tests only. If you wish to call your 17 * method from non-test code, see {@link CalledByNative} instead. 18 */ 19 @Target({ElementType.CONSTRUCTOR, ElementType.METHOD}) 20 @Retention(RetentionPolicy.CLASS) 21 public @interface CalledByNativeForTesting { 22 /* 23 * If present, tells which inner class the method belongs to. 24 */ value()25 public String value() default ""; 26 } 27