Community

How do I inject a static field when a constructor is private?

reply from Ales Justin in JBoss Microcontainer - View the full discussion
So is there way I can quickly inject a static field in a class that has private constructor?

Hmmmm, yes, this might be a problem aka not possible with current IoC support.

 

This looks a lot like <constructor> element's support for static factory method.

I'll have a look on how much work would it be to support this.

e.g. factoryClass + (public) factoryField

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community