Constructor with a combination of parameters and guice injected fields

59 views
Skip to first unread message

Itrat Jameel

unread,
May 27, 2018, 6:29:27 AM5/27/18
to google-guice
Hi,

I have a normal constructor with fields used for creating the object of the class, but I also need a fields injected regarding metrics, which I dont want my caller to pass instead get directly passed by Guice.

MyClass(<User passed parameter>, <Guice injected parameter>)
{
}

Since if constructor injection is happening, then field injection is not getting invoked.How can I achieve this?

Stuart McCulloch

unread,
May 27, 2018, 6:33:24 AM5/27/18
to google-guice
--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/5a351d5a-83ad-45ba-bdfd-60a302fef9b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages