with Xtend you would likely use Guice anyway. The default generator would provide a runtime module. Since Xtend templates are Java classes you usually don't need to configure them explicitly and would usually inject instances of the known template classes in the generator. If now customizations are required the user would provide a customized Guice module which would bind the template class to exchange by the custom implementation.