paul-bjorkstrand commented on a change in pull request #75:
URL: https://github.com/apache/sling-site/pull/75#discussion_r768962662
##########
File path: src/main/jbake/content/documentation/bundles/models.md
##########
@@ -55,6 +57,35 @@ Constructor injection is also supported (as of Sling Models
1.1.0):
Because the name of a constructor argument parameter cannot be detected via
the Java Reflection API a `@Named` annotation is mandatory for injectors that
require a name for resolving the injection.
+Constructors may use any visibility modifier (as of Sling Models 1.5.0):
Review comment:
For fields, yes. Call me crazy, but while I was digging in, to try to
replace reflection with method handles, I did not see method _injection_
anywhere. Everywhere I see method-injection-like code, it only worked with an
interface, using the proxy. I am not sure if private methods in interfaces are
proxyable, thus injectable.
I would be happy to be proven wrong, though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]