Annotation Interface VisibleForTesting


@Target({TYPE,METHOD,FIELD,CONSTRUCTOR}) @Retention(SOURCE) @Documented public @interface VisibleForTesting
Indicates that the visibility was strengthened purely for testing purposes.

NOTE: this should not be used on public members, but is meant only to highlight package-private or protected fields, types, etc., which aren't private in order to allow comprehensive tests. In general, you should try to avoid this, but at times there is no other way.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    An optional justification as to why something was made visible for testing
  • Element Details

    • value

      String value
      An optional justification as to why something was made visible for testing
      Default:
      ""