Integrating Kotlin plugins
In this section, we will take a look at a couple of plugins that make JavaBeans behave as standard Java classes.
Kotlin is interoperable with Java. Although a Java class can easily be converted to Kotlin, Kotlin classes are not readily compatible with Java EE. Plugins are available to make them compatible, meaning that we don't have handle this manually in the code.
Inversion of Control (IoC)-based frameworks load the beans, initialize them with all the required properties, and inject them into the required places. In Java EE, we use the @Inject annotation to inject the dependencies. In order to mock these beans, dependency injection needs to be reconfigured. The Kotlin compiler has support for different plugins, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access