How to let Java-to-Kotlin converter understand Lombok and convert to data class?

Viewed 168

For example, a Java lombok class and its usage:

@Data
class Person {
  String name;
  Integer age;
}

new Person().setName("a").setAge(42);

I want to convert to Kotlin's data class automatically:

data class Person (
  val name: String,
  val age: Int,
)

Person(name="a", age=42)

However, Intellij IDEA's current automatic converter does not seem to do the job... Is there an approach to solve this?

P.S. This is a sibling of Java to Kotlin auto converter: How to automatically convert Streams to kotlin functions?. I make this a separate question to avoid asking two not-that-related things in one question.

1 Answers
Related