MarkusGerhart / spray

Automatically exported from code.google.com/p/spray
0 stars 0 forks source link

Use @Inject instead of new operator in Xtend #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In several places of the Xtend templates the 'new' operator is used to 
instantiate template classes and other helpers.

This is not the recommended way, it is better to inject these objects. This 
way, these classes can use Extensions, otherwise the classes are not managed 
with Guice.

Example:
`XsprayGenerator.xtend`:
{{{
var Plugin plugin = new Plugin()
}}}

Change to
{{{
class XprayGenerator ... {
   @Inject Plugin plugin
}
}}}

Original issue reported on code.google.com by karsten....@googlemail.com on 8 Sep 2011 at 9:08

GoogleCodeExporter commented 8 years ago

Original comment by karsten....@googlemail.com on 8 Sep 2011 at 10:11

GoogleCodeExporter commented 8 years ago
This issue was closed by revision d9daf3c2bb8b.

Original comment by karsten....@googlemail.com on 8 Sep 2011 at 10:54