• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 package com.google.protobuf;
9 
10 import static java.lang.annotation.ElementType.CONSTRUCTOR;
11 import static java.lang.annotation.ElementType.METHOD;
12 
13 import java.lang.annotation.Documented;
14 import java.lang.annotation.Target;
15 
16 /**
17  * Indicates that callers of this API should be inlined. That is, this API is trivially expressible
18  * in terms of another API, for example a method that just calls another method.
19  */
20 @Documented
21 @Target({METHOD, CONSTRUCTOR})
22 @interface InlineMe {
23   /**
24    * What the caller should be replaced with. Local parameter names can be used in the replacement
25    * string. If you are invoking an instance method or constructor, you must include the implicit
26    * {@code this} in the replacement body. If you are invoking a static method, you must include the
27    * implicit {@code ClassName} in the replacement body.
28    */
replacement()29   String replacement();
30 
31   /** The new imports to (optionally) add to the caller. */
imports()32   String[] imports() default {};
33 
34   /** The new static imports to (optionally) add to the caller. */
staticImports()35   String[] staticImports() default {};
36 }
37