Let’s say I have a class that is basically a wrapp...
# announcements
w
Let’s say I have a class that is basically a wrapper around a
String
but it is an organization id (with validation, verification, etc.):
Copy code
class OrganizationId(val id: String) { ... }
And I’d like extend this class to define a method to get all the employees of this organization. I have a DAO that depends on other guice injected properties that I can use to build up this method. My question is: Can I inject the DAO class into an extension function in kotlin? Something like:
Copy code
@Inject
fun OrganizationId.getAllEmployees(myDAO: MyDAO) { ... }