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, which simulate the structure and construct the objects that are suitable for the frameworks to use in an application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset