[ https://issues.apache.org/jira/browse/GROOVY-7078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-7078. ----------------------------- > make @Immutable play nice with constructor injection > ---------------------------------------------------- > > Key: GROOVY-7078 > URL: https://issues.apache.org/jira/browse/GROOVY-7078 > Project: Groovy > Issue Type: Improvement > Components: xforms > Affects Versions: 2.3.6 > Reporter: Christopher Smith > Assignee: Paul King > Priority: Major > Fix For: 2.5.0-beta-3 > > > I have some Spring services that take injected components, and I use > constructor injection whenever possible. These services can't be reconfigured > after startup, and usually make the fields {{final}}. > I would like to be able to use {{@Immutable}} to automatically generate the > constructors and related plumbing for me, but {{@Immutable}} creates two, one > that takes a {{Map}} and one that takes regular arguments. Spring/CDI can't > resolve a single constructor and won't inject. > Would it be feasible to have a way to add an annotation like {{@Inject}} to > the generated tuple constructor, or is there another way that I can make an > {{@Immutable}} class eligible for injection? -- This message was sent by Atlassian JIRA (v7.6.3#76005)