Find Java-style call shapes inside Kotlin source
ProprietarySearch-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$KtRecipemod 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.
- Find Java-style
getX()calls in Kotlin source - Find Java-style
iterable.forEach(Consumer)calls - Find
requireNotNull(javaCall())patterns - Find manual
getX()/setX(v)pairs in Kotlin classes - Find
object Utils { fun foo() = ... }static-utility holders - Find
object Constants { const val A = ... }static-constants holders - Find classes with manual
equals/hashCodeoverrides —data classcandidate - Find inner
class Builderclasses — default-args candidate