[
https://issues.apache.org/jira/browse/SLING-3716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Edelson resolved SLING-3716.
-----------------------------------
Resolution: Fixed
Patch applied in r1619007. Thanks and sorry for the delay!
I made a few changes, mostly formatting and refactoring a few of the inner
classes out of ModelInjectorFactory which has grown a bit too large.
The only significant change worth noting is that the patch changed the contract
of the Injector interface to allow the use of a null name. Since this is
potentially not backwards compatible, I instead decided to use a marker
interface (AcceptsNullName).
I did not deal with the need to make the recursion depth configurable. Will
create a separate issue for that.
> Sling Models: Add support for constructor dependency injection
> --------------------------------------------------------------
>
> Key: SLING-3716
> URL: https://issues.apache.org/jira/browse/SLING-3716
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Stefan Seifert
> Assignee: Justin Edelson
> Priority: Minor
> Labels: models
> Fix For: Sling Models Implementation 1.0.8, Sling Models API 1.0.4
>
> Attachments: 140701_SLING-3716_slingmodes_constructorinjection.patch
>
>
> Currently, Sling Models only supports dependency injection for fields (or
> interface getter methods), but not for constructor arguments. This ticket is
> for discussing what this constructor dependency injection should support, and
> perhaps finally provide a patch to implement it.
> This is somewhat related to SLING-3715 for class-based dependency injection,
> because this would come in especially handy for constructor injection.
--
This message was sent by Atlassian JIRA
(v6.2#6252)