Please don't get carried away building a Java-code-generation infrastructure. Dagger's job is dependency injection. We don't want to dedicate a bunch of classes to code generation; that's yak shaving territory. What you have here is a good balance: it's readable code but we don't have a ton of complexity on the code generator end.