@Inject is used to inject the required dependencies. For example, let's say there are two classes—IdGenerator and Identity. IdGenerator has to be injected into the Identity class. We can use @Inject for this without having to instantiate the IdGenerator inside the Identity class.
This is shown in the following code:
class Identity {
@Inject
private lateinit var idGenerator: IdGenerator
}