Debian Codegraph @

src/com/google/errorprone/annotations/InlineMe.java

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
•1 /*
2 * Copyright 2021 The Error Prone Authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package com.google.errorprone.annotations;
18
19 import static java.lang.annotation.ElementType.CONSTRUCTOR;
20 import static java.lang.annotation.ElementType.METHOD;
21
22 import java.lang.annotation.Documented;
23 import java.lang.annotation.Target;
24
25 /**
26 * Indicates that callers of this API should be inlined. That is, this API is trivially expressible
27 * in terms of another API, for example a method that just calls another method.
28 */
29 @Documented
30 @Target({METHOD, CONSTRUCTOR})
31 public @interface InlineMe {
32 /**
33 * What the caller should be replaced with. Local parameter names can be used in the replacement
34 * string. If you are invoking an instance method or constructor, you must include the implicit
35 * {@code this} in the replacement body. If you are invoking a static method, you must include the
36 * implicit {@code ClassName} in the replacement body.
37 */
38 String replacement();
39
40 /** The new imports to (optionally) add to the caller. */
41 String[] imports() default {};
42
43 /** The new static imports to (optionally) add to the caller. */
44 String[] staticImports() default {};
45 }