title: Kotlin: Setting default when annotating a Java library with Nullability
body: <p>I'd like to annotate a library properly for good Kotlin support. That means, Kotlin knows
  about a non-null Java type and uses Kotlin type to represent it. Non null parameters and
  return values is a useful default, so I'd like to establish it formally within my API. According to <a href="https://kotlinlang.org/docs/reference/java-interop.html" rel="nofollow noreferrer">https://kotlinlang.org/docs/reference/java-interop.html</a> we can use JSR305 annotations to set a default, e.g. via:</p>
  <pre><code>@Nonnull
  @TypeQualifierDefault({ElementType.METHOD, ElementType.PARAMETER})
  public @interface NonNullApi {
  }
  </code></pre>
  <p>However, as stated in the reference, by default Kotlin only warns for JSR305 annotations.
  As also stated, we need to enable strict mode:</p>
  <pre><code>@Nonnull
  @TypeQualifierDefault({ElementType.METHOD, ElementType.PARAMETER})
  @UnderMigration(status = MigrationStatus.STRICT)
  public @interface NonNullApi {
  }
  
  </code></pre>
  <p>But:</p>
  <blockquote>
  <p>The strict value should be considered experimental (more checks may be added to it in the future).</p>
  </blockquote>
  <p>It seems JSR305 has the best support, and lets us establish reasonable defaults, but, doesn't have the desired effect unless enabling a experimental feature.
  What is the current best approach?</p>