I have a POJO builder written in Java class. I want to consume and build the POJO in my kotlin class. I’m getting compilation error that ‘builder’ is not defined
ex:
-
(POJO builder java class)
import lombok.Builder;
import lombok.Data;
import lombok.NonNull;@Builder @Data public class SampleResponse { private String claimCode; private String claimStatus; }
-
Consuming and building the POJO with data in kotlin class:
// the below line is not working. .builder() is not recognized
SampleResponse.builder().claimCode("foo").claimStatus("bar").build()