Annotation Type InlineMe


@Documented
@Target({METHOD,CONSTRUCTOR})
public @interface InlineMe
Indicates that callers of this API should be inlined. That is, this API is trivially expressible in terms of another API, for example a method that just calls another method.
  • Required Element Summary

    Required Elements
    Modifier and Type Required Element Description
    String replacement
    What the caller should be replaced with.
  • Optional Element Summary

    Optional Elements
    Modifier and Type Optional Element Description
    String[] imports
    The new imports to (optionally) add to the caller.
    String[] staticImports
    The new static imports to (optionally) add to the caller.
  • Element Details

    • replacement

      String replacement
      What the caller should be replaced with. Local parameter names can be used in the replacement string. If you are invoking an instance method or constructor, you must include the implicit this in the replacement body. If you are invoking a static method, you must include the implicit ClassName in the replacement body.
    • imports

      String[] imports
      The new imports to (optionally) add to the caller.
      Default:
      {}
    • staticImports

      String[] staticImports
      The new static imports to (optionally) add to the caller.
      Default:
      {}