Community
Participate
Working Groups
The following part from the language reference needs yet to be implemented: Guice Keys Xtend uses Guice as the dependency injection container, which in turn uses types as keys. Those types can be generified, which is why you can write the following in Xtend. @Inject HashMap<String,MyType> myCache; Also Guice allows to use annotations to further distinct between different implementations of the same type. This is usually done by using the com.google.inject.name.Named annotation or a custom annotation which is itself annotated with com.google.inject.BindingAnnotation . Xtend supports these two variants: @Inject @CustomAnnotation my.Service customService; @Inject @"NamedThingy" my.Service namedService; Providers are declared like in plain Guice. That is you wrap your type into com.google.inject.Provider . Example: @Inject @CustomAnnotation Provider<Service> customServiceProvider;
We have changed the language spec and decided to fully support Java Annotations, which makes this superfluous.