Annotation Interface OnlineDocumentation


@Target(TYPE) @Retention(SOURCE) public @interface OnlineDocumentation
Signals that a Refaster rule or group of Refaster rules comes with online documentation.

The provided value may be a full URL, or a URL pattern containing either or both of the "${topLevelClassName}" and "${nestedClassName}" placeholders.

By default it is assumed that the Refaster rule(s) are documented on the Error Prone Support website. Annotations on nested classes override the documentation URL associated with any enclosing class.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The URL or URL pattern of the website at which the annotated Refaster rule(s) are documented.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The URL placeholder value that will be replaced with the name of the nested class in which the annotated Refaster rule is located, if applicable.
    static final String
    The URL placeholder value that will be replaced with the name of the top-level class in which the annotated Refaster rule is located.
  • Field Details

    • TOP_LEVEL_CLASS_URL_PLACEHOLDER

      static final String TOP_LEVEL_CLASS_URL_PLACEHOLDER
      The URL placeholder value that will be replaced with the name of the top-level class in which the annotated Refaster rule is located.
      See Also:
    • NESTED_CLASS_URL_PLACEHOLDER

      static final String NESTED_CLASS_URL_PLACEHOLDER
      The URL placeholder value that will be replaced with the name of the nested class in which the annotated Refaster rule is located, if applicable.

      If the Refaster rule is not defined in a nested class then this placeholder will be replaced with the empty string. In case the Refaster rule is syntactically nested inside a deeper hierarchy of classes, then this placeholder will be replaced with concatenation of the names of all these classes (except the top-level class name), separated by dots.

      See Also:
  • Element Details

    • value

      String value
      The URL or URL pattern of the website at which the annotated Refaster rule(s) are documented.
      Returns:
      A non-null string, optionally containing the "${topLevelClassName}" and "${nestedClassName}" placeholders.
      Default:
      "https://error-prone.picnic.tech/refasterrules/${topLevelClassName}#${nestedClassName}"