[ https://issues.apache.org/jira/browse/GROOVY-7078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547672#comment-14547672 ]
Paul King commented on GROOVY-7078: ----------------------------------- I made a separate issue for the PR577 proposed changes required for TupleConstructor (GROOVY-7427). This issue can remain to cover how that would be plumbed into @Immutable. > 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 > > 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 (v6.3.4#6332)