Find Java-style call shapes inside Kotlin source

Proprietary

Search-only bundle of Java idioms that have idiomatic Kotlin equivalents at the call site: getX()/isX() getters where property syntax reads the same value, iterable.forEach(Consumer), requireNotNull(javaCall()) over platform types, manual getX/setX pairs, static-utility/constants object holders, Builder classes, and manual equals/hashCode.

org.openrewrite.kotlin.interop.FindJavaIdiomsInKotlin$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.interop.FindJavaIdiomsInKotlin$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find Java-style getX() calls in Kotlin source
  2. Find Java-style iterable.forEach(Consumer) calls
  3. Find requireNotNull(javaCall()) patterns
  4. Find manual getX() / setX(v) pairs in Kotlin classes
  5. Find object Utils { fun foo() = ... } static-utility holders
  6. Find object Constants { const val A = ... } static-constants holders
  7. Find classes with manual equals/hashCode overrides — data class candidate
  8. Find inner class Builder classes — default-args candidate