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 3// found in the LICENSE file. 4 5package org.chromium.base; 6 7import java.lang.annotation.ElementType; 8import java.lang.annotation.Retention; 9import java.lang.annotation.RetentionPolicy; 10import java.lang.annotation.Target; 11 12/** 13 * JNIAdditionalImport is used by the JNI generator to qualify inner types used on JNI methods. Must 14 * be used when an inner class is used from a class within the same package. Example: 15 * 16 * <pre> 17 * @JNIAdditionImport(Foo.class) 18 * public class Bar { 19 * @CalledByNative static void doSomethingWithInner(Foo.Inner inner) { 20 * ... 21 * } 22 * } 23 * <pre> 24 * <p> 25 * Notes: 26 * 1) Foo must be in the same package as Bar 27 * 2) For classes in different packages, they should be imported as: 28 * import other.package.Foo; 29 * and this annotation should not be used. 30 */ 31@Target(ElementType.TYPE) 32@Retention(RetentionPolicy.CLASS) 33public @interface JNIAdditionalImport { 34 Class<?>[] value(); 35} 36